From 3fb9d58235ce4985689840b901aecacc6e3bd094 Mon Sep 17 00:00:00 2001 From: Pascal Obry Date: Fri, 4 Sep 2009 13:58:32 +0200 Subject: [PATCH] Do not scramble password read from .cvspass Passwords stored in .cvspass are already scrambled, we do not want to scramble them twice. Only passwords read from the command line are scrambled. This fixes a regression introduced by b2139db (git-cvsimport: add support for cvs pserver password scrambling., 2009-08-14). Signed-off-by: Pascal Obry Signed-off-by: Junio C Hamano --- git-cvsimport.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 593832d81..d7411151d 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -238,7 +238,9 @@ sub conn { } my $rr = ":pserver:$user\@$serv:$port$repo"; - unless ($pass) { + if ($pass) { + $pass = $self->_scramble($pass); + } else { open(H,$ENV{'HOME'}."/.cvspass") and do { # :pserver:cvs@mea.tmt.tele.fi:/cvsroot/zmailer Ah) { @@ -253,8 +255,6 @@ sub conn { }; } - $pass = $self->_scramble($pass); - my ($s, $rep); if ($proxyhost) { -- 2.30.2