chiark / gitweb /
forbidden files: check them properly
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 22 Aug 2015 10:12:59 +0000 (11:12 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 22 Aug 2015 10:12:59 +0000 (11:12 +0100)
dgit

diff --git a/dgit b/dgit
index 7b447dedaf3db59f1778918c9f6204e81db5266e..dbb0a062e57bd206432dd05bf57b03e73c6c9709 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1751,7 +1751,14 @@ sub pull () {
 }
 
 sub check_not_dirty () {
+    foreach my $f (qw(local-options local-patch-header)) {
+       if (stat_exists "debian/source/$f") {
+           fail "git tree contains debian/source/$f";
+       }
+    }
+
     return if $ignoredirty;
+
     my @cmd = (@git, qw(diff --quiet HEAD));
     debugcmd "+",@cmd;
     $!=0; $?=0; system @cmd;
@@ -1761,12 +1768,6 @@ sub check_not_dirty () {
     } else {
        failedcmd @cmd;
     }
-
-    foreach my $f (qw(local-options local-patch-header)) {
-       if (stat_exists "debian/source/$f") {
-           fail "git tree contains debian/source/$f";
-       }
-    }
 }
 
 sub commit_admin ($) {