summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2019-05-21 13:39:44 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2019-06-28 12:45:38 +0100
commitd01fd9703f518305690d7fe79883a1365b343feb (patch)
tree01dbf2a1da1ad65b107f439c344336f229f24900 /dgit
parent75581df3d6c82c3727971756a028b7b2a4d97dce (diff)
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 <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit22
1 files changed, 14 insertions, 8 deletions
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) {