summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c238dad)
raw | patch | inline | side by side (parent: c238dad)
author | Gordon Hopper <g.hopper@computer.org> | |
Thu, 8 Nov 2007 20:15:20 +0000 (13:15 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 9 Nov 2007 09:23:40 +0000 (01:23 -0800) |
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>
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>
git-cvsimport.perl | patch | blob | history |
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index e4bc2b54f68930df217751975e32b4224f8d765c..efa6a0c41ad5a253047789e8ac2a30bf57f8646d 100755 (executable)
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
}
}
- $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";