summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e289b3f)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
our $suite_re = '[-+.0-9a-z]+';
our $cleanmode_re = qr{(?: dpkg-source (?: -d )?
| git | git-ff
our $suite_re = '[-+.0-9a-z]+';
our $cleanmode_re = qr{(?: dpkg-source (?: -d )?
| git | git-ff
+ | check (?: ,ignores )?
# the rules clean target which might modify tracked files (!)
if ($cleanmode =~ m{^check}) {
my @cmd = (@git, qw(clean -dn));
# the rules clean target which might modify tracked files (!)
if ($cleanmode =~ m{^check}) {
my @cmd = (@git, qw(clean -dn));
+ push @cmd, qw(-x) unless $cleanmode =~ m{ignores};
my $leftovers = cmdoutput @cmd;
if (length $leftovers) {
print STDERR $leftovers, "\n" or confess $!;
my $leftovers = cmdoutput @cmd;
if (length $leftovers) {
print STDERR $leftovers, "\n" or confess $!;
} elsif (s/^-wc$//s) {
push @ropts, $&;
$cleanmode = 'check';
} 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 ];
} elsif (s/^-c([^=]*)\=(.*)$//s) {
push @git, '-c', $&;
$gitcfgs{cmdline}{$1} = [ $2 ];
but it also removes any subdirectories containing different git
trees (which only unusual packages are likely to create).
.TP
but it also removes any subdirectories containing different git
trees (which only unusual packages are likely to create).
.TP
-.BR --clean=check " | " -wc
+.BR --clean=check " | " --clean=check,ignores " | " -wc " | " -wci
Merely check that the tree is clean (does not contain uncommitted
files).
Avoids running rules clean,
and can avoid needing the build-dependencies.
Merely check that the tree is clean (does not contain uncommitted
files).
Avoids running rules clean,
and can avoid needing the build-dependencies.
+
+With
+.BR ,ignores
+or
+.BR -wci ,
+untracked files covered by .gitignore are tolerated,
+so only files which show up as
+.B ?
+in git status
+(ie, ones you maybe forgot to git add)
+are treated as a problem.
.TP
.BR --clean=none " | " -wn
Do not clean the tree, nor check that it is clean.
.TP
.BR --clean=none " | " -wn
Do not clean the tree, nor check that it is clean.