Skip to content

Commit

Permalink
Merge branch 'gh/cvsimport-user'
Browse files Browse the repository at this point in the history
* gh/cvsimport-user:
  git-cvsimport: fix handling of user name when it is not set in CVSROOT
  • Loading branch information
Junio C Hamano committed Nov 14, 2007
2 parents 93cbbd7 + 2e458e0 commit e318f60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-cvsimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ sub conn {
}
}

$user="anonymous" unless defined $user;
# if username is not explicit in CVSROOT, then use current user, as cvs would
$user=(getlogin() || $ENV{'LOGNAME'} || $ENV{'USER'} || "anonymous") unless $user;
my $rr2 = "-";
unless ($port) {
$rr2 = ":pserver:$user\@$serv:$repo";
Expand Down

0 comments on commit e318f60

Please sign in to comment.