chiark / gitweb /
dgit: quilt fixup: Move split brain branch creation out a bit
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 20 May 2019 22:52:00 +0000 (23:52 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 28 Jun 2019 11:45:38 +0000 (12:45 +0100)
Move the playtree git branch, and the setting $split_brain from
quiltify_splitbrain (inside quilt_fixup_multipatch, conditional on
quiltmode_splitbrain) to quilt_fixup_multipatch.

This is still not quite right - it needs to be further out, because it
should affect quilt_fixup_singlepatch too.  Right now singlepatch DTWT
in split brain mode.

No functional change for now, anyway.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index cf12faeafe3cc048c940712e3e3f431b256644de..66b16bbf8d7bcca902dc6e8d072c4385b3bf8db1 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -5400,10 +5400,7 @@ sub quiltify_splitbrain ($$$$$$$) {
     local $ENV{GIT_AUTHOR_EMAIL} = $authline[1];
     local $ENV{GIT_AUTHOR_DATE} =  $authline[2];
 
-    die if $split_brain;
     die unless $do_split_brain;
-    runcmd @git, qw(checkout -q -b dgit-view);
-    $split_brain = 1;
 
     my $fulldiffhint = sub {
        my ($x,$y) = @_;
@@ -6225,6 +6222,11 @@ END
     push @failsuggestion, [ 'origs', __
  "Maybe orig tarball(s) are not identical to git representation?" ];
 
+    if ($do_split_brain) {
+       runcmd @git, qw(checkout -q -b dgit-view);
+       die if $split_brain;
+       $split_brain = 1;
+    }
     if (quiltmode_splitbrain()) {
        quiltify_splitbrain($clogp, $unapplied, $headref, $oldtiptree,
                             $diffbits, \%editedignores,