chiark / gitweb /
dgit: Some extra error reports for wrong split brain mode
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 22 Sep 2016 00:10:31 +0000 (01:10 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 26 Sep 2016 00:16:59 +0000 (01:16 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 13c8addd895df282131000851f4355c6ba22344a..77eae6b0dafedafb69b441a33c731c4478b571bf 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3316,6 +3316,13 @@ sub quiltify_splitbrain ($$$$$$) {
        }  
        fail $msg;
     }
+    if ($quilt_mode =~ m/dpm/ &&
+       ($diffbits->{H2A} & 01)) {
+       fail <<END;
+--quilt=$quilt_mode specified, implying patches-applied git tree
+ but git tree differs from result of applying debian/patches to upstream
+END
+    }
     if ($quilt_mode =~ m/gbp|unapplied/ &&
        ($diffbits->{O2A} & 01)) { # some patches
        quiltify_splitbrain_needed();
@@ -3325,6 +3332,14 @@ sub quiltify_splitbrain ($$$$$$) {
        runcmd @git, qw(update-ref refs/heads/dgit-view HEAD);
        runcmd @git, qw(checkout -q dgit-view);
     }
+    if ($quilt_mode =~ m/gbp|dpm/ &&
+       ($diffbits->{O2A} & 02)) {
+       fail <<END
+--quilt=$quilt_mode specified, implying that HEAD is for use with a
+ tool which does not create patches for changes to upstream
+ .gitignores: but, such patches exist in debian/patches.
+END
+    }
     if (($diffbits->{H2O} & 02) && # user has modified .gitignore
        !($diffbits->{O2A} & 02)) { # patches do not change .gitignore
        quiltify_splitbrain_needed();