[PATCH 2/5] switch to central prompt method
Signed-off-by: Sven Strickroth <email@cs-ware.de>
---
git-svn.perl | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index eeb83d3..25d5da7 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -4415,13 +4415,8 @@ sub username {
sub _read_password {
my ($prompt, $realm) = @_;
- my $password = '';
- if (exists $ENV{GIT_ASKPASS}) {
- open(PH, "-|", $ENV{GIT_ASKPASS}, $prompt);
- $password = <PH>;
- $password =~ s/[\012\015]//; # \n\r
- close(PH);
- } else {
+ my $password = Git->askpass_prompt($prompt);;
+ if (!defined $password) {
print STDERR $prompt;
STDERR->flush;
require Term::ReadKey;
--
Best regards,
Sven Strickroth
ClamAV, a GPL anti-virus toolkit http://www.clamav.net
PGP key id F5A9D4C4 @ any key-server