diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-14 14:03:27 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-14 14:03:27 -0800 |
commit | e318f607235bd5d7bc1c5c7e669380d1978cdb13 (patch) | |
tree | 69a0c142d11aa9585f9ceef84a83e33fa6af01ad | |
parent | user-manual: minor rewording for clarity. (diff) | |
parent | git-cvsimport: fix handling of user name when it is not set in CVSROOT (diff) | |
download | tgif-e318f607235bd5d7bc1c5c7e669380d1978cdb13.tar.xz |
Merge branch 'gh/cvsimport-user'
* gh/cvsimport-user:
git-cvsimport: fix handling of user name when it is not set in CVSROOT
-rwxr-xr-x | git-cvsimport.perl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl index e4bc2b54f6..efa6a0c41a 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -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"; |