chiark / gitweb /
Do defaulting for $cleanmode just before invoking main $fn->() (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 14 Aug 2015 11:13:49 +0000 (12:13 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 14 Aug 2015 17:34:57 +0000 (18:34 +0100)
dgit

diff --git a/dgit b/dgit
index d7d27f8..bde052e 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -57,7 +57,7 @@ our $rmonerror = 1;
 our @deliberatelies;
 our %previously;
 our $existing_package = 'dpkg';
-our $cleanmode = 'dpkg-source';
+our $cleanmode;
 our $changes_since_version;
 our $quilt_mode;
 our $quilt_modes_re = 'linear|smash|auto|nofix|nocheck';
@@ -3312,6 +3312,8 @@ if (!defined $quilt_mode) {
     $quilt_mode = $1;
 }
 
+$cleanmode //= 'dpkg-source';    
+
 my $fn = ${*::}{"cmd_$cmd"};
 $fn or badusage "unknown operation $cmd";
 $fn->();