diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 2954fb846e3372a648124d92b7c1a1ccbd44306f..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";
$state = 4;
} elsif ($state == 4 and s/^Branch:\s+//) {
s/\s+$//;
+ tr/_/\./ if ( $opt_u );
s/[\/]/$opt_s/g;
$branch = $_;
$state = 5;