From cc236eb448eb278d367271964b96a81cb7d286db Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 11 Oct 2018 01:33:21 +0100 Subject: [PATCH] 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 --- dgit | 11 +++++++++++ 1 file changed, 11 insertions(+) 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(); -- 2.30.2