chiark / gitweb /
Refuse to do quilt fixup (explicitly or as a result of build). Closes:#731632.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Jan 2014 01:09:13 +0000 (01:09 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Jan 2014 01:09:13 +0000 (01:09 +0000)
debian/changelog
dgit

index bfdb0e9d6ebdb8c64d62918ebced7d35991fc6af..594eadaa8672638cc917ff4a52adab9b9717824f 100644 (file)
@@ -10,6 +10,8 @@ dgit (0.21~~iwj) unstable; urgency=low
   * Run a clean (of the specified type) before any build operation; do
     this with `dpkg-buildpackage -T' clean if necessary, so -wd now works
     with all the building methods.
   * Run a clean (of the specified type) before any build operation; do
     this with `dpkg-buildpackage -T' clean if necessary, so -wd now works
     with all the building methods.
+  * Refuse to do quilt fixup (explicitly or as a result of build).
+    Closes:#731632.
 
  --
 
 
  --
 
diff --git a/dgit b/dgit
index 7752d824f6c30023304ac8a0716d84f67d41a2eb..5c0ea82facc28e39a92a59542af46574f7133942 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1734,6 +1734,17 @@ sub build_maybe_quilt_fixup () {
     chomp;
     return unless madformat($_);
     # sigh
     chomp;
     return unless madformat($_);
     # sigh
+    
+    my @cmd = (@git, qw(ls-files --exclude-standard -iodm));
+    my $problems = cmdoutput @cmd;
+    if (length $problems) {
+       print STDERR "problematic files:\n";
+       print STDERR "  $_\n" foreach split /\n/, $problems;
+       fail "Cannot do quilt fixup in tree containing ignored files.  ".
+           "Perhaps your package's clean target is broken, in which".
+           " case -wg (which says to use git-clean -xdf) may help.";
+    }
+
     my $clogp = parsechangelog();
     my $version = getfield $clogp, 'Version';
     my $author = getfield $clogp, 'Maintainer';
     my $clogp = parsechangelog();
     my $version = getfield $clogp, 'Version';
     my $author = getfield $clogp, 'Maintainer';