summaryrefslogtreecommitdiff
path: root/git-archimport.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2005-11-12 09:27:21 (GMT)
committerMartin Langhoff <martin@catalyst.net.nz>2005-11-17 07:29:35 (GMT)
commit9b626e752eebcc49acab19085947e67b5e61e39f (patch)
treefabf0cea28e9e3a5916e048653d5b9fe1ef3cbb1 /git-archimport.perl
parenta7fb51d3d4d303d61831b2fe5127a088b050e60b (diff)
downloadgit-9b626e752eebcc49acab19085947e67b5e61e39f.zip
git-9b626e752eebcc49acab19085947e67b5e61e39f.tar.gz
git-9b626e752eebcc49acab19085947e67b5e61e39f.tar.bz2
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>
Diffstat (limited to 'git-archimport.perl')
-rwxr-xr-xgit-archimport.perl8
1 files changed, 7 insertions, 1 deletions
diff --git a/git-archimport.perl b/git-archimport.perl
index b7c1fbf..d8e6f4e 100755
--- a/git-archimport.perl
+++ b/git-archimport.perl
@@ -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