Skip to content

Commit 0354539

Browse files
committed
Merge branch 'ep/cvstag'
* ep/cvstag: Use git-tag in git-cvsimport
2 parents ca6c097 + 5c08931 commit 0354539

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

git-cvsimport.perl

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -772,30 +772,8 @@ sub commit {
772772
$xtag =~ tr/_/\./ if ( $opt_u );
773773
$xtag =~ s/[\/]/$opt_s/g;
774774

775-
my $pid = open2($in, $out, 'git-mktag');
776-
print $out "object $cid\n".
777-
"type commit\n".
778-
"tag $xtag\n".
779-
"tagger $author_name <$author_email>\n"
780-
or die "Cannot create tag object $xtag: $!\n";
781-
close($out)
782-
or die "Cannot create tag object $xtag: $!\n";
783-
784-
my $tagobj = <$in>;
785-
chomp $tagobj;
786-
787-
if ( !close($in) or waitpid($pid, 0) != $pid or
788-
$? != 0 or $tagobj !~ /^[0123456789abcdef]{40}$/ ) {
789-
die "Cannot create tag object $xtag: $!\n";
790-
}
791-
792-
793-
open(C,">$git_dir/refs/tags/$xtag")
775+
system('git-tag', $xtag, $cid) == 0
794776
or die "Cannot create tag $xtag: $!\n";
795-
print C "$tagobj\n"
796-
or die "Cannot write tag $xtag: $!\n";
797-
close(C)
798-
or die "Cannot write tag $xtag: $!\n";
799777

800778
print "Created tag '$xtag' on '$branch'\n" if $opt_v;
801779
}

0 commit comments

Comments
 (0)