From 281574017d739c42bb264f20c1059efe42afa0aa Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 6 Jun 2019 15:02:05 +0100 Subject: [PATCH] dgit: Fix check for --include-dirty --quilt= This needs to know whether we are actually in split brain mode. build_or_push_prep_modes has just determined the answer, so put it there. Signed-off-by: Ian Jackson --- dgit | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dgit b/dgit index 7aae321a..49382869 100755 --- a/dgit +++ b/dgit @@ -6441,6 +6441,8 @@ sub build_or_push_prep_modes () { if (madformat_wantfixup($format) && quiltmode_splitbrain()) { $do_split_brain = 1; } + fail __ "dgit: --include-dirty is not supported in split view quilt mode" + if $do_split_brain && $includedirty; } sub build_prep_early () { @@ -7578,11 +7580,6 @@ sub parseopts_late_defaults () { $$vr = $v; } - fail __ "dgit: --include-dirty is not supported in split view quilt mode" - # xxx this does not actually work, because $split brain is - # not set this early - if $split_brain && $includedirty; - if (!defined $cleanmode) { local $access_forpush; $cleanmode = access_cfg('clean-mode-newer', 'RETURN-UNDEF'); -- 2.30.2