From d4bd3417c76450f248952606bff7e586600e34a8 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 14 Aug 2015 18:15:26 +0100 Subject: Honour *.clean-mode configuration setting for --clean= mode. --- debian/changelog | 1 + dgit | 9 ++++++++- dgit.1 | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3