Skip to content

Commit 3fb9d58

Browse files
TurboGitgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 79b4fde commit 3fb9d58

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git-cvsimport.perl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ sub conn {
238238
}
239239
my $rr = ":pserver:$user\@$serv:$port$repo";
240240

241-
unless ($pass) {
241+
if ($pass) {
242+
$pass = $self->_scramble($pass);
243+
} else {
242244
open(H,$ENV{'HOME'}."/.cvspass") and do {
243245
# :pserver:[email protected]:/cvsroot/zmailer Ah<Z
244246
while (<H>) {
@@ -253,8 +255,6 @@ sub conn {
253255
};
254256
}
255257

256-
$pass = $self->_scramble($pass);
257-
258258
my ($s, $rep);
259259
if ($proxyhost) {
260260

0 commit comments

Comments
 (0)