Skip to content

Commit

Permalink
Handle a revision that only creates a new tag correctly.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yaacov Akiba Slama authored and Junio C Hamano committed Nov 8, 2005
1 parent 109fc2b commit a16db4f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions git-svnimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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".
Expand Down

0 comments on commit a16db4f

Please sign in to comment.