Skip to content

Commit

Permalink
archimport: don't die on merge-base failure
Browse files Browse the repository at this point in the history
Don't die if we can't find a merge base, Arch allows arbitrary
cherry-picks between unrelated branches and we should not
die when that happens

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
  • Loading branch information
Eric Wong authored and Martin Langhoff committed Nov 17, 2005
1 parent a7fb51d commit 9b626e7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion git-archimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,13 @@ sub find_parents {
next unless -e "$git_dir/refs/heads/$branch";

my $mergebase = `git-merge-base $branch $ps->{branch}`;
die "Cannot find merge base for $branch and $ps->{branch}" if $?;
if ($?) {
# Don't die here, Arch supports one-way cherry-picking
# between branches with no common base (or any relationship
# at all beforehand)
warn "Cannot find merge base for $branch and $ps->{branch}";
next;
}
chomp $mergebase;

# now walk up to the mergepoint collecting what patches we have
Expand Down

0 comments on commit 9b626e7

Please sign in to comment.