chiark / gitweb /
git-debrebase: Do not try split brain gdr make-patches
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 24 Aug 2018 20:41:55 +0000 (21:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 24 Aug 2018 20:41:55 +0000 (21:41 +0100)
Print a helpful error message instead.

Closes: #906908.

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

diff --git a/dgit b/dgit
index 1f1b0f5..5e9d711 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -4235,6 +4235,15 @@ END
     my $actualhead = git_rev_parse('HEAD');
 
     if (branch_is_gdr_unstitched_ff($symref, $actualhead, $archive_hash)) {
+       if (quiltmode_splitbrain()) {
+           my ($ffq_prev, $gdrlast) = branch_gdr_info($symref, $actualhead);
+           fail <<END;
+Branch is managed by git-debrebase ($ffq_prev
+exists), but quilt mode ($quilt_mode) implies a split view.
+Pass the right --quilt option or adjust your git config.
+Or, maybe, run git-debrebase forget-was-ever-debrebase.
+END
+       }
        runcmd_ordryrun_local @git_debrebase, 'stitch';
        $actualhead = git_rev_parse('HEAD');
     }