chiark / gitweb /
dgit: Factor out debian/source/.. in check_not_dirty
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 3591231fba1ce27d8c1673f1a889ee0240d4c40e..8df8f761baf9347ce341102b0fd5229aaf4fb03d 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3817,9 +3817,11 @@ sub pull () {
 }
 
 sub check_not_dirty () {
-    foreach my $f (qw(local-options local-patch-header)) {
-       if (stat_exists "debian/source/$f") {
-           fail f_ "git tree contains debian/source/%s", $f;
+    my @forbid = qw(local-options local-patch-header);
+    @forbid = map { "debian/source/$_" } @forbid;
+    foreach my $f (@forbid) {
+       if (stat_exists $f) {
+           fail f_ "git tree contains %s", $f;
        }
     }