summaryrefslogtreecommitdiff
path: root/git-debrebase
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-11 12:25:20 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-11 12:25:20 +0100
commit099608874f16c22a774ff9f427a8f172c84c66f9 (patch)
tree4373cd0d6e2c2f601ede74d422a38339890249b9 /git-debrebase
parentcd7d350f25a111bec0843ff4cb60507ee92e4677 (diff)
git-debrebase: keycommits: Handle merged-breakwater commits
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'git-debrebase')
-rwxr-xr-xgit-debrebase17
1 files changed, 17 insertions, 0 deletions
diff --git a/git-debrebase b/git-debrebase
index 8ddf18d..672551d 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -810,6 +810,21 @@ sub classify ($) {
return $classify->("VanillaMerge");
}
+sub keycommits ($;$$$$$);
+
+sub mergedbreakwaters_anchor ($) {
+ my ($cl) = @_;
+ my $best_anchor;
+ foreach my $p (@{ $cl->{Parents} }) {
+ my ($panchor, $pbw) = keycommits $p->{CommitId},
+ undef,undef,undef,undef, 1;
+ $best_anchor = $panchor
+ if !defined $best_anchor
+ or is_fast_fwd $best_anchor, $panchor;
+ }
+ return $best_anchor;
+}
+
sub keycommits ($;$$$$$) {
my ($head, $furniture, $unclean, $trouble, $fatal, $claimed_bw) = @_;
# => ($anchor, $breakwater)
@@ -901,6 +916,8 @@ sub keycommits ($;$$$$$) {
$x->($trouble, 'vanillamerge',
"found vanilla merge"," ($head)");
return (undef,undef);
+ } elsif ($ty eq 'MergedBreakwaters') {
+ $found_anchor->(mergedbreakwaters_anchor $cl);
} else {
$x->($fatal, 'unprocessable',
"found unprocessable commit, cannot cope: $cl->{Why}",