@matheusbsbs / matheus-bagliano / commits / a16db4f472
Fork 0

Handle a revision that only creates a new tag correctly.

Fix an error when a svn revision consists only of the creation of a new tag directory (/tags/this_is_a_tag). Signed-off-by: Yaacov Akiba Slama <ya@slamail.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Yaacov Akiba Slama committed Nov 2, 2005 at 23:51 UTC a16db4f472887a9050bf528bc7f0b94d6f7e8319
1 file changed +5
git-svnimport.perl
+5
@@ -648,6 +648,10 @@ sub commit {
648 die "Error running git-commit-tree: $?\n" if $?;
649 }
650
651 + if (not defined $cid) {
652 + $cid = $branches{"/"}{"LAST"};
653 + }
654 +
655 if(not defined $dest) {
656 print "... no known parent\n" if $opt_v;
657 } elsif(not $tag) {
@@ -664,6 +668,7 @@ sub commit {
668 # the tag was 'complex', i.e. did not refer to a "real" revision
669
670 $dest =~ tr/_/\./ if $opt_u;
671 + $branch = $dest;
672
673 my $pid = open2($in, $out, 'git-mktag');
674 print $out ("object $cid\n".