X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-svn.perl;h=89f83fd27abe315804173a809b3c7ef00ead6527;hb=bd2c86ef00f032be925edacfc2d284ab9b6b9eab;hp=7849cfc141d384bc28479c2f37fd128c77fe0fbe;hpb=8784e4dddeb16a89dd19bfb879788b8df0aac1f5;p=git.git diff --git a/git-svn.perl b/git-svn.perl index 7849cfc14..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; @@ -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)) {