summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-13 11:15:57 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-13 12:20:45 +0100
commit55997f200aa0471662c0b2dfec5bd4523f42dbe7 (patch)
treefa930fe125a1eb190c4907d8b4c98d35e56b9a8f /dgit
parentf4c0fe2181b75d62827ddf71ae1c8fbfc14874d0 (diff)
dgit: Implement clean_tree_check for mode -wc
This part of the fix for #910705. This makes -wc actually work with build_source. But per the discussion in #910705 we want to implement some checking in dpkg-source[-d] mode too. We need to teach the test suite about this notion of checking cleanlines rather than cleaning. For now we wildcard C*. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit17
1 files changed, 10 insertions, 7 deletions
diff --git a/dgit b/dgit
index b4943a2..7f58bc5 100755
--- a/dgit
+++ b/dgit
@@ -6200,7 +6200,15 @@ sub maybe_unapply_patches_again () {
#----- other building -----
sub clean_tree_check () {
- # Not yet implemented. The lack of this is part of #910705.
+ # Not yet fully implemented.
+ if ($cleanmode eq 'check') {
+ my $leftovers = cmdoutput @git, qw(clean -xdn);
+ if (length $leftovers) {
+ print STDERR $leftovers, "\n" or confess $!;
+ fail __
+ "tree contains uncommitted files and --clean=check specified";
+ }
+ }
}
sub clean_tree () {
@@ -6217,12 +6225,7 @@ sub clean_tree () {
} elsif ($cleanmode eq 'git-ff') {
runcmd_ordryrun_local @git, qw(clean -xdff);
} elsif ($cleanmode eq 'check') {
- my $leftovers = cmdoutput @git, qw(clean -xdn);
- if (length $leftovers) {
- print STDERR $leftovers, "\n" or confess $!;
- fail __
- "tree contains uncommitted files and --clean=check specified";
- }
+ clean_tree_check();
} elsif ($cleanmode eq 'none') {
} else {
die "$cleanmode ?";