From 02201fcb3e2f7e92ccf115811c3e909a490f0a80 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 13 Oct 2018 11:56:06 +0100 Subject: dgit: Provide new clean mode --clean=check,ignores Signed-off-by: Ian Jackson --- dgit | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dgit') diff --git a/dgit b/dgit index 351e089..7eb0531 100755 --- a/dgit +++ b/dgit @@ -103,7 +103,7 @@ our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)"); our $suite_re = '[-+.0-9a-z]+'; our $cleanmode_re = qr{(?: dpkg-source (?: -d )? | git | git-ff - | check + | check (?: ,ignores )? | none )}x; @@ -6210,7 +6210,7 @@ sub clean_tree_check () { # the rules clean target which might modify tracked files (!) if ($cleanmode =~ m{^check}) { my @cmd = (@git, qw(clean -dn)); - push @cmd, qw(-x); + push @cmd, qw(-x) unless $cleanmode =~ m{ignores}; my $leftovers = cmdoutput @cmd; if (length $leftovers) { print STDERR $leftovers, "\n" or confess $!; @@ -7266,6 +7266,9 @@ sub parseopts () { } elsif (s/^-wc$//s) { push @ropts, $&; $cleanmode = 'check'; + } elsif (s/^-wci$//s) { + push @ropts, $&; + $cleanmode = 'check,ignores'; } elsif (s/^-c([^=]*)\=(.*)$//s) { push @git, '-c', $&; $gitcfgs{cmdline}{$1} = [ $2 ]; -- cgit v1.2.3