aboutsummaryrefslogtreecommitdiffstats
path: root/git-svn.perl
diff options
context:
space:
mode:
authorSteven Walter <swalter@lpdev.prtdev.lexmark.com>2010-09-02 18:32:06 -0400
committerEric Wong <normalperson@yhbt.net>2010-09-24 08:23:53 +0000
commita3c75056dc73661a6cdab180659f52cdb03b357c (patch)
treec788c2a484ca9007c5b9918495ebaf6cfc3df844 /git-svn.perl
parentc9be27f39488b20946e3a7ba57d776e03708a1fa (diff)
downloadgit-a3c75056dc73661a6cdab180659f52cdb03b357c.tar.gz
git-svn: check_cherry_pick should exclude commits already in our history
The merge-base between @$parents and $merge_tip may have been reached through a merge commit. This means that some commits that are ancestors of @$parents will not be ancestors of $merge_base. The mergeinfo property will not list commits that are ancestors of @$parents, so we need to explicitly exclude them. [ew: squashed and cleaned up test case from Steven] Signed-off-by: Steven Walter <stevenrwalter@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 9b046b693f..c7c4dcdba5 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3118,9 +3118,10 @@ sub _rev_list {
sub check_cherry_pick {
my $base = shift;
my $tip = shift;
+ my $parents = shift;
my @ranges = @_;
my %commits = map { $_ => 1 }
- _rev_list("--no-merges", $tip, "--not", $base);
+ _rev_list("--no-merges", $tip, "--not", $base, @$parents);
for my $range ( @ranges ) {
delete @commits{_rev_list($range)};
}
@@ -3296,6 +3297,7 @@ sub find_extra_svn_parents {
# double check that there are no missing non-merge commits
my (@incomplete) = check_cherry_pick(
$merge_base, $merge_tip,
+ $parents,
@$ranges,
);