Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
archimport: don't die on merge-base failure
author
Eric Wong
<normalperson@yhbt.net>
Sat, 12 Nov 2005 09:27:21 +0000
(
01:27
-0800)
committer
Martin Langhoff
<martin@catalyst.net.nz>
Thu, 17 Nov 2005 07:29:35 +0000
(20:29 +1300)
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>
git-archimport.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
a7fb51d
)
diff --git
a/git-archimport.perl
b/git-archimport.perl
index b7c1fbf0ca19a0b5cc052d076022a7feafbe2d97..d8e6f4e4486223651568532fa628840d5a70254d 100755
(executable)
--- 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}`;
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
chomp $mergebase;
# now walk up to the mergepoint collecting what patches we have