From: Ian Jackson Date: Sat, 22 Aug 2015 10:12:59 +0000 (+0100) Subject: forbidden files: check them properly X-Git-Tag: debian/1.4~4 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=d8d9cfc47004f047540c6d0059ddd7005b380a27 forbidden files: check them properly --- diff --git a/dgit b/dgit index 7b447ded..dbb0a062 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 ($) {