summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-08-14 18:15:26 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2015-08-14 18:34:58 +0100
commitd4bd3417c76450f248952606bff7e586600e34a8 (patch)
tree62bad84f4dd099b8829ccad6f6b052b9bfc76d2a
parent53849d5fc76b4c7ee502129cc045c042f42eb8aa (diff)
Honour *.clean-mode configuration setting for --clean= mode.
-rw-r--r--debian/changelog1
-rwxr-xr-xdgit9
-rw-r--r--dgit.14
3 files changed, 13 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index db433fb..442b255 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ dgit (1.2~~) UNRELEASED; urgency=low
* Document that tags are in DEP-14 format, and that they
are used for authenticating pushes.
* Correct manpage cross-reference to point to browse.d.d.o.
+ * Honour *.clean-mode configuration setting for --clean= mode.
--
diff --git a/dgit b/dgit
index bde052e..8396971 100755
--- a/dgit
+++ b/dgit
@@ -3312,7 +3312,14 @@ if (!defined $quilt_mode) {
$quilt_mode = $1;
}
-$cleanmode //= 'dpkg-source';
+if (!defined $cleanmode) {
+ local $access_forpush;
+ $cleanmode = access_cfg('clean-mode', 'RETURN-UNDEF');
+ $cleanmode //= 'dpkg-source';
+
+ badcfg "unknown clean-mode \`$cleanmode'" unless
+ $cleanmode =~ m/^($cleanmode_re)$(?!\n)/s;
+}
my $fn = ${*::}{"cmd_$cmd"};
$fn or badusage "unknown operation $cmd";
diff --git a/dgit.1 b/dgit.1
index 3875658..ffb6746 100644
--- a/dgit.1
+++ b/dgit.1
@@ -634,6 +634,10 @@ which is involved. The config used is thereafter that for the distro.
.BI dgit.default.distro " distro"
The default distro for an unknown suite.
.TP
+.BR dgit-distro. \fIdistro\fR .clean-mode
+One of the values for the command line --clean= option; used if
+--clean is not specified.
+.TP
.BR dgit-distro. \fIdistro\fR .readonly " " auto | a " | " true | t | y | 1 " | " false | f | n | 0
Whether you have push access to the distro.
For Debian, it is OK to use auto, which uses readonly mode if you are