summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-11-29 18:29:42 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-16 16:47:47 +0100
commitfbdbb1232bc9f06f6da84e07a2f7b0f427ce03ce (patch)
tree98c7e97c4483d81329f2becc75b08c466b927272 /dgit
parent35786bae6f659ab4c0595c829e2b436e0c292d1c (diff)
Split brain: introduce quiltmode_splitbrain() (nfc)
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit8
1 files changed, 6 insertions, 2 deletions
diff --git a/dgit b/dgit
index b22d6ab..fedc7fb 100755
--- a/dgit
+++ b/dgit
@@ -200,6 +200,10 @@ sub deliberately_not_fast_forward () {
}
}
+sub quiltmode_splitbrain () {
+ $quilt_mode =~ m/gbp|dpm|unapplied/;
+}
+
#---------- remote protocol support, common ----------
# remote push initiator/responder protocol:
@@ -3038,7 +3042,7 @@ END
close $fakedsc or die $!;
my $splitbrain_cachekey;
- if ($quilt_mode =~ m/gbp|dpm|unapplied/) {
+ if (quiltmode_splitbrain()) {
# we look in the reflog of dgit-intern/quilt-cache
# we look for an entry whose message is the key for the cache lookup
my @cachekey = (qw(dgit), $our_version);
@@ -3173,7 +3177,7 @@ END
push @failsuggestion, "Maybe you need to specify one of".
" --quilt=gbp --quilt=dpm --quilt=unapplied ?";
- if ($splitbrain_cachekey) {
+ if (quiltmode_splitbrain()) {
quiltify_splitbrain($clogp, $unapplied, $headref,
$diffbits, \%editedignores,
$splitbrain_cachekey);