diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-10-11 01:33:21 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-10-11 01:41:13 +0100 |
commit | cc236eb448eb278d367271964b96a81cb7d286db (patch) | |
tree | 4fa17aa489e196b587959164713de9affdb5ef87 | |
parent | 86b1bd2035ce1da863c682223893b59ed74962f9 (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>
-rwxr-xr-x | dgit | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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(); |