branch: elpa/magit
commit a43c1d8d7a99dd2b9f865285bed442dddb0e5ce8
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    magit-process-password-prompt-regexps: Increase flexibility
    
    - Account for different levels of politeness and verbosity, but
      insist on reasonable capitalization.
    
    - Since we don't try to determine a key's identifier anyway, when
      asked for a passphrase, essentially only look for a reasonably
      anchored string "passphrase".
    
    - Make the trailing space after the colon optional in one more case,
      for consistency.  Now it is optional in all cases.  We cannot know
      for sure from strings posted into the issue tracker, whether the
      colon was or was not followed by a space.
---
 lisp/magit-process.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index ea6bf6eacf2..8ab9f409ef6 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -159,16 +159,16 @@ itself from the hook, to avoid further futile attempts."
 (defcustom magit-process-password-prompt-regexps
   ;; See also history in test `magit-process:password-prompt-regexps'.
   '(;; * CLI-prompt for passphrase for key:
-    "^\\(Enter \\)?[Pp]assphrase\\( for \\(RSA \\)?key '.*'\\)?: ?$"
+    "^\\(\\(Please e\\|E\\)nter \\(the \\)?p\\|P\\)assphrase"
     ;; * Password for something other than a host:
     "^\\(\\(Please e\\|E\\)nter \\(the \\)?p\\|P\\)assword: ?$"
     ;; * Password for [user@]host (which we put in match group 99):
-    "^\\(Enter \\)?[Pp]assword for \
+    "^\\(\\(Please e\\|E\\)nter \\(the \\)?p\\|P\\)assword for \
 [\"']?\\(https?://\\)?\\(?99:[^\"']+\\)[\"']?: ?$"
     "^(\\(?1:[^) ]+\\)) Password for \\(?99:\\1\\): ?$" ;#4992
     "^\\(?99:[^']+\\)\\('s\\)? password: ?$"
     ;; * Token for git-credential-manager-core (#4318):
-    "^Token: $"
+    "^Token: ?$"
     ;; * Secret for card:
     "^Yubikey for .*: ?$"
     "^Enter PIN for .*: ?$"

Reply via email to