mirror of
https://github.com/git/git.git
synced 2024-11-19 06:33:56 +01:00
git-cvsimport: fix handling of user name when it is not set in CVSROOT
The cvs programs do not default to "anonymous" as the user name, but use the currently logged in user. This patch more closely matches the cvs behavior. Signed-off-by: Gordon Hopper <g.hopper@computer.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
c238dad407
commit
2e458e0575
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user