X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=git-svn.perl;h=89f83fd27abe315804173a809b3c7ef00ead6527;hb=d28790dc31ca1bcdca7254a6b9381b6c84e91271;hp=0fd2fd2188b93fe15bda901f512bd55ad3a5034a;hpb=87a684fc531f1685fefdfbe871ac590760e892df;p=git.git diff --git a/git-svn.perl b/git-svn.perl index 0fd2fd218..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)) { @@ -5765,7 +5769,7 @@ sub cmd_show_log { my (@k, $c, $d, $stat); my $esc_color = qr/(?:\033\[(?:(?:\d+;)*\d*)?m)*/; while (<$log>) { - if (/^${esc_color}commit (- )?($::sha1_short)/o) { + if (/^${esc_color}commit (?:- )?($::sha1_short)/o) { my $cmt = $1; if ($c && cmt_showable($c) && $c->{r} != $r_last) { $r_last = $c->{r};