chiark / gitweb /
Subcommand program or argument options containing hyphens work. (Eg, --dpkg-buildpack...
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 2a5e26b0e0dcbca60b938a18e87c6fa09371316f..0f372f21a3b33c690c1a1a5a7004da788f98a08f 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -655,7 +655,7 @@ sub sshpsql ($$) {
     my ($userhost,$dbname) = ($`,$'); #';
     my @rows;
     my @cmd = (access_cfg_ssh, $userhost,
-              shellquote qw(psql -A), $dbname, qw(-c), $sql);
+              "export LANG=C; ".shellquote qw(psql -A), $dbname, qw(-c), $sql);
     printcmd(\*DEBUG,$debugprefix."|",@cmd) if $debug>0;
     open P, "-|", @cmd or die $!;
     while (<P>) {
@@ -1896,12 +1896,12 @@ sub parseopts () {
            } elsif (m/^--since-version=([^_]+|_)$/) {
                push @ropts, $_;
                $changes_since_version = $1;
-           } elsif (m/^--(\w+)=(.*)/s &&
+           } elsif (m/^--([-0-9a-z]+)=(.*)/s &&
                     ($om = $opts_opt_map{$1}) &&
                     length $om->[0]) {
                push @ropts, $_;
                $om->[0] = $2;
-           } elsif (m/^--(\w+):(.*)/s &&
+           } elsif (m/^--([-0-9a-z]+):(.*)/s &&
                     !$opts_opt_cmdonly{$1} &&
                     ($om = $opts_opt_map{$1})) {
                push @ropts, $_;