aboutsummaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2011-06-18 08:48:00 +0200
committerEric Wong <normalperson@yhbt.net>2011-06-28 03:26:11 +0000
commit124b70a2adad2b2efdf50150a6840f1327d2f2cd (patch)
treed2b9f2f790084bb3624df84d26d28b8703dfcc2c /git-svn.perl
parenteabd73a3b587615ca60e820dfa1b8802d1659db3 (diff)
downloadgit-124b70a2adad2b2efdf50150a6840f1327d2f2cd.tar.gz
git-124b70a2adad2b2efdf50150a6840f1327d2f2cd.tar.xz
git-svn: Correctly handle root commits in mergeinfo ranges
If the bottom of a mergeinfo range is a commit that maps to a git root commit, then it doesn't have a parent. In such a case, use git commit range "$top_commit" rather than "$bottom_commit^..$top_commit". [ew: line-wrap at 80 columns] Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl8
1 files changed, 6 insertions, 2 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 1f1aa5710..89f83fd27 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3124,8 +3124,12 @@ sub lookup_svn_merge {
next;
}
- push @merged_commit_ranges,
- "$bottom_commit^..$top_commit";
+ if (scalar(command('rev-parse', "$bottom_commit^@"))) {
+ push @merged_commit_ranges,
+ "$bottom_commit^..$top_commit";
+ } else {
+ push @merged_commit_ranges, "$top_commit";
+ }
if ( !defined $tip or $top > $tip ) {
$tip = $top;