X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-cvsimport.perl;h=e4bc2b54f68930df217751975e32b4224f8d765c;hb=fed1b5cac0cc3ae324dc004181a276ea16589951;hp=433b7fd3246cf1ab29f3d74befbf6db5adfc8d2c;hpb=57bd934ea69f0151b729b74fd77629b94920cca7;p=git.git diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 433b7fd32..e4bc2b54f 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -774,13 +774,12 @@ sub commit { or die "Cannot write branch $branch for update: $!\n"; if ($tag) { - my ($in, $out) = ('',''); my ($xtag) = $tag; $xtag =~ s/\s+\*\*.*$//; # Remove stuff like ** INVALID ** and ** FUNKY ** $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; @@ -819,6 +818,7 @@ while () { $state = 4; } elsif ($state == 4 and s/^Branch:\s+//) { s/\s+$//; + tr/_/\./ if ( $opt_u ); s/[\/]/$opt_s/g; $branch = $_; $state = 5; @@ -1008,7 +1008,7 @@ if ($orig_branch) { if ($opt_r && $opt_o ne 'HEAD'); system('git-update-ref', 'HEAD', "$orig_branch"); unless ($opt_i) { - system('git checkout'); + system('git checkout -f'); die "checkout failed: $?\n" if $?; } }