X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=dgit;h=a37e89796fd9c784d9588f1f7e054212eabe70d0;hp=8df8f761baf9347ce341102b0fd5229aaf4fb03d;hb=ffa00870d1ce6ae18d11aa7511f432b7b184e1e9;hpb=86b1bd2035ce1da863c682223893b59ed74962f9 diff --git a/dgit b/dgit index 8df8f761..a37e8979 100755 --- a/dgit +++ b/dgit @@ -790,6 +790,9 @@ sub git_get_config ($) { @$l==1 or badcfg f_ "multiple values for %s (in %s git config)", $c, $src if @$l > 1; + $l->[0] =~ m/\n/ and badcfg f_ + "value for config option %s (in %s git config) contains newline(s)!", + $c, $src; return $l->[0]; } return undef; @@ -3825,6 +3828,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();