chiark / gitweb /
Honour *.clean-mode configuration setting for --clean= mode.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 14 Aug 2015 17:15:26 +0000 (18:15 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 14 Aug 2015 17:34:58 +0000 (18:34 +0100)
debian/changelog
dgit
dgit.1

index db433fbb866b3dae01f3386d38a6e032b8a49e7a..442b255707a968d19dd96430759d2afb1339c0cc 100644 (file)
@@ -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.
   * 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 bde052ea4f9dc22708b18101fcac329ceb7e5fc4..83969717816bc5286d0566d2d7f1956e1085ad05 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3312,7 +3312,14 @@ if (!defined $quilt_mode) {
     $quilt_mode = $1;
 }
 
     $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";
 
 my $fn = ${*::}{"cmd_$cmd"};
 $fn or badusage "unknown operation $cmd";
diff --git a/dgit.1 b/dgit.1
index 38756581da72ae207f30efb1753d869c8bb9ce79..ffb67468160fc694cf2c87793a33f817d4221323 100644 (file)
--- 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
 .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
 .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