1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-06 04:06:14 +02:00

archimport: don't die on merge-base failure

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>
This commit is contained in:
Eric Wong 2005-11-12 01:27:21 -08:00 committed by Martin Langhoff
parent a7fb51d3d4
commit 9b626e752e

View File

@ -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