Code

git-filter-branch.sh: more portable tr usage: use \012, not \n.
[git.git] / git-cvsimport.perl
index d565091c35b1931035bbfdf455efec38fde51833..92648f40c98096d624a3a80feab4d3a818089b5a 100755 (executable)
@@ -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";