aboutsummaryrefslogtreecommitdiff
path: root/git-svnimport.perl
diff options
context:
space:
mode:
authorYaacov Akiba Slama <ya@slamail.org>2005-11-02 23:51:57 +0200
committerJunio C Hamano <junkio@cox.net>2005-11-08 01:24:49 -0800
commita16db4f472887a9050bf528bc7f0b94d6f7e8319 (patch)
treeca9885180f4ea3b96833a3a5b59978f3527d3713 /git-svnimport.perl
parent109fc2b97b73090a4a0a6550cdf9b2446fd12389 (diff)
downloadgit-a16db4f472887a9050bf528bc7f0b94d6f7e8319.tar.gz
git-a16db4f472887a9050bf528bc7f0b94d6f7e8319.tar.xz
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>
Diffstat (limited to 'git-svnimport.perl')
-rwxr-xr-xgit-svnimport.perl5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-svnimport.perl b/git-svnimport.perl
index ae82a7c09..e97f47059 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".