Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
perl/Git.pm: Honor SSH_ASKPASS as fallback if GIT_ASKPASS is not set
author
Sven Strickroth
<sven.strickroth@tu-clausthal.de>
Tue, 18 Dec 2012 00:28:47 +0000
(
01:28
+0100)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 18 Dec 2012 01:21:24 +0000
(17:21 -0800)
If GIT_ASKPASS environment variable is not set, git-svn does not try to use
SSH_ASKPASS as git-core does. This change adds a fallback to SSH_ASKPASS.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
perl/Git.pm
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
38ecf3a
)
diff --git
a/perl/Git.pm
b/perl/Git.pm
index 72e93c7e1b938f1909056a51646781ace26e06f2..8dfca65454efe07c397531b78eafcebebf69fdb7 100644
(file)
--- a/
perl/Git.pm
+++ b/
perl/Git.pm
@@
-515,8
+515,8
@@
sub version {
Query user C<PROMPT> and return answer from user.
Query user C<PROMPT> and return answer from user.
-Honours GIT_ASKPASS
environment variable
for querying
-the user. If no
GIT
_ASKPASS variable is set or an error occoured,
+Honours GIT_ASKPASS
and SSH_ASKPASS environment variables
for querying
+the user. If no
*
_ASKPASS variable is set or an error occoured,
the terminal is tried as a fallback.
=cut
the terminal is tried as a fallback.
=cut
@@
-527,6
+527,9
@@
sub prompt {
if (exists $ENV{'GIT_ASKPASS'}) {
$ret = _prompt($ENV{'GIT_ASKPASS'}, $prompt);
}
if (exists $ENV{'GIT_ASKPASS'}) {
$ret = _prompt($ENV{'GIT_ASKPASS'}, $prompt);
}
+ if (!defined $ret && exists $ENV{'SSH_ASKPASS'}) {
+ $ret = _prompt($ENV{'SSH_ASKPASS'}, $prompt);
+ }
if (!defined $ret) {
print STDERR $prompt;
STDERR->flush;
if (!defined $ret) {
print STDERR $prompt;
STDERR->flush;