From d8d9cfc47004f047540c6d0059ddd7005b380a27 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 22 Aug 2015 11:12:59 +0100 Subject: forbidden files: check them properly --- dgit | 13 +++++++------ 1 file 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 ($) { -- cgit v1.2.3