提交 9b626e75 编写于 作者: E Eric Wong 提交者: Martin Langhoff

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: NEric Wong <normalperson@yhbt.net>
Signed-off-by: NMartin Langhoff <martin@catalyst.net.nz>
上级 a7fb51d3
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册