summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-13 10:55:36 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-13 10:55:36 +0100
commit0457c2d771ef6fe6c0883344add9dd4da0c60917 (patch)
tree742d70a970aaddc7763bc333d1f84af466fbb050 /dgit
parent7053910ee1c73badd2df933b28e5fdad8eee161f (diff)
dgit: Honour new .clean-mode-newer access config option
This will allow us to extend the set of clean modes without causing irresolvable compatibility problems for users. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit5
1 files changed, 4 insertions, 1 deletions
diff --git a/dgit b/dgit
index de14c1e..8c7f288 100755
--- a/dgit
+++ b/dgit
@@ -7355,7 +7355,10 @@ sub parseopts_late_defaults () {
if (!defined $cleanmode) {
local $access_forpush;
- $cleanmode = access_cfg('clean-mode', 'RETURN-UNDEF');
+ $cleanmode = access_cfg('clean-mode-newer', 'RETURN-UNDEF');
+ $cleanmode = undef if $cleanmode && $cleanmode !~ m/^$cleanmode_re$/;
+
+ $cleanmode //= access_cfg('clean-mode', 'RETURN-UNDEF');
$cleanmode //= 'dpkg-source';
badcfg f_ "unknown clean-mode \`%s'", $cleanmode unless