branch: elpa/magit
commit becbda1071a1dc5fac47854f6d02e576d704fdd0
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-process-yes-or-no-prompt-regexp: Fix regexp for cli passphrases
When we stopped matching text that might identify the key
in [1: a43c1d8d7a], the intention was only to avoid false-negatives
by being to restrictive. However, since `magit-process-match-prompt'
only returns the matched text (i.e., it doesn't extend to the end of
the line), we do have to match the full line. Allow anything after
"passphrase" and only insist on the trailing colon.
See #5291.
1: 2025-01-25 a43c1d8d7a99dd2b9f865285bed442dddb0e5ce8
magit-process-password-prompt-regexps: Increase flexibility
---
lisp/magit-process.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index 8ab9f409ef6..cdde64756c2 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -159,7 +159,7 @@ 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:
- "^\\(\\(Please e\\|E\\)nter \\(the \\)?p\\|P\\)assphrase"
+ "^\\(\\(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):