- # The above tells us which way *we* will generate them. But we
- # might encounter ad-hoc anchor merges generated manually,
- # which might be the other way around. In principle, in some odd
- # situations, an anchor merge might have two identical parents.
- # In that case we guess which way round it is (ie, which parent
- # has the upstream history). The order of the 2-iteration loop
- # controls which guess we make.
-
- # XXX we are going to desupport non-git-debrebase-generated anchors
-
- foreach my $prevbrw (qw(0 1)) {
- if (!$p[$prevbrw]{IsOrigin} && # breakwater never starts with an origin
- !($p[!$prevbrw]{Differs} & ~DS_DEB) && # no non-debian changess
- !($p[$prevbrw]{Differs} & ~D_UPS)) { # no non-upstream changes
- return $classify->(qw(Anchor),
- OrigParents => [ $p[!$prevbrw] ]);
- }
- }
+ $p[0]{IsOrigin} and $badanchor->("is an origin commit");
+ $p[1]{Differs} & ~DS_DEB and
+ $badanchor->("upstream files differ from left parent");
+ $p[0]{Differs} & ~D_UPS and
+ $badanchor->("debian/ differs from right parent");