From: Ian Jackson Date: Fri, 14 Aug 2015 17:15:26 +0000 (+0100) Subject: Honour *.clean-mode configuration setting for --clean= mode. X-Git-Tag: debian/1.2~19 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=d4bd3417c76450f248952606bff7e586600e34a8 Honour *.clean-mode configuration setting for --clean= mode. --- diff --git a/debian/changelog b/debian/changelog index db433fbb..442b2557 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 bde052ea..83969717 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 38756581..ffb67468 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