X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-cvsimport.perl;h=efa6a0c41ad5a253047789e8ac2a30bf57f8646d;hb=5d3d1cacc139194672a6a184509bb620a19b2497;hp=ba23eb8eebdb841139062d4221c87515b96d8729;hpb=71e55854fd6e5c9ce786bcd20efef43bd56f9df0;p=git.git diff --git a/git-cvsimport.perl b/git-cvsimport.perl index ba23eb8ee..efa6a0c41 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"; @@ -779,7 +780,7 @@ sub commit { $xtag =~ tr/_/\./ if ( $opt_u ); $xtag =~ s/[\/]/$opt_s/g; - system('git-tag', $xtag, $cid) == 0 + system('git-tag', '-f', $xtag, $cid) == 0 or die "Cannot create tag $xtag: $!\n"; print "Created tag '$xtag' on '$branch'\n" if $opt_v; @@ -818,6 +819,7 @@ while () { $state = 4; } elsif ($state == 4 and s/^Branch:\s+//) { s/\s+$//; + tr/_/\./ if ( $opt_u ); s/[\/]/$opt_s/g; $branch = $_; $state = 5;