summaryrefslogtreecommitdiff
path: root/git-debrebase
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-08-25 10:44:04 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-06-16 12:25:49 +0100
commit78dfec329693691f0ff468e444d7ae19aec220d1 (patch)
treeaf064532a07557fd976d4134dfbaa0d41673a37b /git-debrebase
parent025a34d5ceee06d7fc673b5c6f131c0f72f3c3af (diff)
git-debrebase: classify: introduce $prevbrw (nfc)
Diffstat (limited to 'git-debrebase')
-rwxr-xr-xgit-debrebase11
1 files changed, 7 insertions, 4 deletions
diff --git a/git-debrebase b/git-debrebase
index b2c15d6..a3733a9 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -398,13 +398,16 @@ sub classify ($) {
# debian/) so debian breakwater branch should be 1st parent; that
# way also there's also an easy rune to look for the upstream
# patches (--topo-order).
+
+ my $prevbrw = 0;
+
if (@p == 2 &&
!$haspatches &&
- !$p[0]{IsOrigin} && # breakwater merge never starts with an origin
- !($p[0]{Differs} & ~D_DEB) &&
- !($p[1]{Differs} & ~D_UPS)) {
+ !$p[$prevbrw]{IsOrigin} && # breakwater never starts with an origin
+ !($p[$prevbrw]{Differs} & ~D_DEB) &&
+ !($p[!$prevbrw]{Differs} & ~D_UPS)) {
return $classify->(qw(BreakwaterUpstreamMerge),
- OrigParents => [ $p[1] ]);
+ OrigParents => [ $p[!$prevbrw] ]);
}
# xxx multi-.orig upstreams