chiark / gitweb /
In option parser test `@ARGV' not `length @ARGV'. Closes:#795710.
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 6ca1f33b38fdfb8408d5bf88203ddcbb94bf32af..62cd049929cd7dd63a723f3902e26a14afd710d9 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3161,7 +3161,7 @@ sub parseopts () {
        my ($what) = @_;
        @rvalopts = ($_);
        if (!defined $val) {
-           badusage "$what needs a value" unless length @ARGV;
+           badusage "$what needs a value" unless @ARGV;
            $val = shift @ARGV;
            push @rvalopts, $val;
        }
@@ -3246,9 +3246,6 @@ sub parseopts () {
                    push @ropts, $&;
                    push @changesopts, $_;
                    $_ = '';
-               } elsif (m/^-[dCk]$/) {
-                   badusage
- "option \`$_' requires an argument (and no space before the argument)";
                } elsif (s/^-wn$//s) {
                    push @ropts, $&;
                    $cleanmode = 'none';