From: Ian Jackson Date: Thu, 11 Oct 2018 00:33:21 +0000 (+0100) Subject: dgit: Refuse to work if critical files have uncommitted changes X-Git-Tag: archive/debian/8.0~37 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=cc236eb448eb278d367271964b96a81cb7d286db 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 --- diff --git a/dgit b/dgit index 8df8f761..6dbf166c 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();