From: Yaacov Akiba Slama Date: Wed, 2 Nov 2005 21:51:57 +0000 (+0200) Subject: Handle a revision that only creates a new tag correctly. X-Git-Tag: v0.99.9g^2~2^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a16db4f472887a9050bf528bc7f0b94d6f7e8319;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-svnimport.perl b/git-svnimport.perl index ae82a7c0..e97f4705 100755 --- a/git-svnimport.perl +++ b/git-svnimport.perl @@ -648,6 +648,10 @@ sub commit { die "Error running git-commit-tree: $?\n" if $?; } + if (not defined $cid) { + $cid = $branches{"/"}{"LAST"}; + } + if(not defined $dest) { print "... no known parent\n" if $opt_v; } elsif(not $tag) { @@ -664,6 +668,7 @@ sub commit { # the tag was 'complex', i.e. did not refer to a "real" revision $dest =~ tr/_/\./ if $opt_u; + $branch = $dest; my $pid = open2($in, $out, 'git-mktag'); print $out ("object $cid\n".