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 | 93cbbd7121c34b04576518b663f188c5495d4575 (diff) | |
| parent | 2e458e0575de6478693586d387f71873d280b934 (diff) | |
| download | git-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"; |
