summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-08-22 11:12:59 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2015-08-22 11:12:59 +0100
commitd8d9cfc47004f047540c6d0059ddd7005b380a27 (patch)
tree9030e625a1921d0d2f8e412cee354d90abe31ba6 /dgit
parentfef73c57e195e389e6bd9f0ae6ec48a020c70c16 (diff)
forbidden files: check them properly
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit13
1 files changed, 7 insertions, 6 deletions
diff --git a/dgit b/dgit
index 7b447de..dbb0a06 100755
--- 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 ($) {