Make magit ask for password also when git is asking for an host password

Previously we were asking only when there was a passphrase for ssh key.
This commit is contained in:
Rémi Vanicat 2010-03-20 08:29:15 +01:00 committed by Phil Jackson
parent 3d1faa122e
commit c256a726d4

View file

@ -1289,14 +1289,13 @@ FUNC should leave point at the end of the modified region"
(defun magit-password (proc string)
"Checks if git/ssh asks for a password and ask the user for it."
(when (string-match "^Enter passphrase for key '\\\(.*\\\)': $" string)
(when (or (string-match "^Enter passphrase for key '\\\(.*\\\)': $" string)
(string-match "^\\\(.*\\\)'s password:" string))
(process-send-string proc
(concat (read-passwd
(format "Password for '%s': " (match-string 1 string))
nil) "\n"))))
(defun magit-process-filter (proc string)
(save-current-buffer
(set-buffer (process-buffer proc))