summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-11 01:33:21 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-11 01:41:13 +0100
commitcc236eb448eb278d367271964b96a81cb7d286db (patch)
tree4fa17aa489e196b587959164713de9affdb5ef87 /dgit
parent86b1bd2035ce1da863c682223893b59ed74962f9 (diff)
dgit: Refuse to work if critical files have uncommitted changes
Notably, d/source/format and options, and the forbidden files. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit11
1 files changed, 11 insertions, 0 deletions
diff --git a/dgit b/dgit
index 8df8f76..6dbf166 100755
--- a/dgit
+++ b/dgit
@@ -3825,6 +3825,17 @@ sub check_not_dirty () {
}
}
+ my @cmd = (@git, qw(status -uall --ignored --porcelain));
+ push @cmd, qw(debian/source/format debian/source/options);
+ push @cmd, @forbid;
+
+ my $bad = cmdoutput @cmd;
+ if (length $bad) {
+ fail +(__
+ "you have uncommitted changes to critical files, cannot continue:\n").
+ $bad;
+ }
+
return if $includedirty;
git_check_unmodified();