chiark / gitweb /
Convert to defvalopt: -c
[dgit.git] / dgit
diff --git a/dgit b/dgit
index b06e0782aca0dbc1671f107b33e6568f6583018c..24772a90efb37c729fead5388573c884d1196798 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3127,6 +3127,9 @@ defvalopt '--distro',        '-d', '.+',      \$idistro;
 defvalopt '--existing-package','', '.*',      \$existing_package;
 defvalopt '--build-products-dir','','.*',     \$buildproductsdir;
 defvalopt '--clean',       '', $cleanmode_re, \$cleanmode;
+defvalopt '--quilt',     '', $quilt_modes_re, \$quilt_mode;
+
+defvalopt '', '-c', '.*=.*', sub { push @git, '-c', @_; };
 
 defvalopt '--initiator-tempdir','','.*', sub {
     ($initiator_tempdir) = (@_);
@@ -3196,11 +3199,6 @@ sub parseopts () {
                     ($om = $opts_opt_map{$1})) {
                push @ropts, $_;
                push @$om, $2;
-           } elsif (m/^--quilt=($quilt_modes_re)$/s) {
-               push @ropts, $_;
-               $quilt_mode = $1;
-           } elsif (m/^--quilt=(.*)$/s) {
-               badusage "unknown quilt fixup mode \`$1'";
            } elsif (m/^--ignore-dirty$/s) {
                push @ropts, $_;
                $ignoredirty = 1;
@@ -3240,9 +3238,6 @@ sub parseopts () {
                    push @ropts, $&;
                    push @changesopts, $_;
                    $_ = '';
-               } elsif (s/^-c(.*=.*)//s) {
-                   push @ropts, $&;
-                   push @git, '-c', $1;
                } elsif (s/^-C(.+)//s) {
                    push @ropts, $&;
                    $changesfile = $1;