From c256a726d4a902c47f1eac8b0cf10f27a28953f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Sat, 20 Mar 2010 08:29:15 +0100 Subject: [PATCH] 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. --- magit.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/magit.el b/magit.el index 9b8f355b..0743cdb3 100644 --- a/magit.el +++ b/magit.el @@ -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))