From d01fd9703f518305690d7fe79883a1365b343feb Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 21 May 2019 13:39:44 +0100 Subject: dgit: dopush pseudomerge, break apart from quilt fixup In the future, we are going to have split brain in situations without any quilt fixup. We will use $do_split_brain for this. In that situation, do the splitbrain pseudomerge too. No actual functional change yet. Signed-off-by: Ian Jackson --- dgit | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'dgit') diff --git a/dgit b/dgit index db56b50..cf12fae 100755 --- a/dgit +++ b/dgit @@ -4493,6 +4493,7 @@ END if (madformat_wantfixup($format)) { # user might have not used dgit build, so maybe do this now: if (quiltmode_splitbrain()) { + $do_split_brain = 1; changedir $playground; quilt_make_fake_dsc($upstreamversion); my $cachekey; @@ -4502,17 +4503,22 @@ END "--quilt=%s but no cached dgit view: perhaps HEAD changed since dgit build[-source] ?", $quilt_mode; - $split_brain = 1; - $dgithead = splitbrain_pseudomerge($clogp, - $actualhead, $dgithead, - $archive_hash); - $maintviewhead = $actualhead; - changedir $maindir; - prep_ud(); # so _only_subdir() works, below - } else { + } + if (!$do_split_brain) { + # In split brain mode, do not attempt to incorporate dirty + # stuff from the user's working tree. That would be mad. commit_quilty_patch(); } } + if ($do_split_brain) { + $split_brain = 1; + $dgithead = splitbrain_pseudomerge($clogp, + $actualhead, $dgithead, + $archive_hash); + $maintviewhead = $actualhead; + changedir $maindir; + prep_ud(); # so _only_subdir() works, below + } if (defined $overwrite_version && !defined $maintviewhead && $archive_hash) { -- cgit v1.2.3