summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2019-06-29 12:43:16 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2019-06-29 13:51:06 +0100
commit41b9d185ce39caddeb029f99c240faa4e5918ea2 (patch)
treef790c9abfe1f734d335c70664867dc2c8ec2fa52 /dgit
parent1d679b1f9e9ad664e898dfb53692ebbafea52f95 (diff)
dgit: baredebian: Reject --clean=git
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit12
1 files changed, 12 insertions, 0 deletions
diff --git a/dgit b/dgit
index 831a60c..ac68c65 100755
--- a/dgit
+++ b/dgit
@@ -6389,6 +6389,18 @@ sub clean_tree_check () {
sub clean_tree () {
# We always clean the tree ourselves, rather than leave it to the
# builder (dpkg-source, or soemthing which calls dpkg-source).
+ if ($quilt_mode =~ m/baredebian/ and $cleanmode =~ m/git/) {
+ fail f_ <<END, $quilt_mode, $cleanmode;
+quilt mode %s (generally needs untracked upstream files)
+contradicts clean mode %s (which would delete them)
+END
+ # This is not 100% true: dgit build-source and push-source
+ # (for example) could operate just fine with no upstream
+ # source in the working tree. But it doesn't seem likely that
+ # the user wants dgit to proactively delete such things.
+ # -wn, for example, would produce identical output without
+ # deleting anything from the working tree.
+ }
if ($cleanmode =~ m{^dpkg-source}) {
my @cmd = @dpkgbuildpackage;
push @cmd, qw(-d) if $cleanmode =~ m{^dpkg-source-d};