diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-06-29 16:42:41 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-06-29 16:42:41 -0700 |
commit | 76c82f90abde8820461e042c6654673f1147881d (patch) | |
tree | ba3429adee1760fcf52f6e902c9acb6d3108feea /git-svn.perl | |
parent | f5cfd52f7b85d693b3782297819981a502a0135b (diff) | |
parent | 124b70a2adad2b2efdf50150a6840f1327d2f2cd (diff) | |
download | git-76c82f90abde8820461e042c6654673f1147881d.tar.gz |
Merge git://bogomips.org/git-svn into maint
* git://bogomips.org/git-svn:
git-svn: Correctly handle root commits in mergeinfo ranges
git-svn: Disambiguate rev-list arguments to improve error message
git-svn: Demonstrate a bug with root commits in mergeinfo ranges
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-x | git-svn.perl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/git-svn.perl b/git-svn.perl index 7849cfc141..89f83fd27a 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; @@ -3154,9 +3158,9 @@ sub check_cherry_pick { my $parents = shift; my @ranges = @_; my %commits = map { $_ => 1 } - _rev_list("--no-merges", $tip, "--not", $base, @$parents); + _rev_list("--no-merges", $tip, "--not", $base, @$parents, "--"); for my $range ( @ranges ) { - delete @commits{_rev_list($range)}; + delete @commits{_rev_list($range, "--")}; } for my $commit (keys %commits) { if (has_no_changes($commit)) { |