From: Ian Jackson Date: Sat, 5 Jan 2019 20:27:06 +0000 (+0000) Subject: dgit: Provide --program!:option X-Git-Tag: archive/debian/8.3~36 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=6c32ca2f056fc65bfc1aedbac6cdccdec0df0e01 dgit: Provide --program!:option Apropos of #904862. Signed-off-by: Ian Jackson --- diff --git a/dgit b/dgit index c62d1cc1..a5f93145 100755 --- a/dgit +++ b/dgit @@ -7192,6 +7192,12 @@ sub parseopts () { ($om = $opts_opt_map{$1})) { push @ropts, $_; push @$om, $2; + } elsif (m/^--([-0-9a-z]+)\!:(.*)/s && + !$opts_opt_cmdonly{$1} && + ($om = $opts_opt_map{$1})) { + push @ropts, $_; + my $cmd = shift @$om; + @$om = ($cmd, grep { $_ ne $2 } @$om); } elsif (m/^--(gbp|dpm)$/s) { push @ropts, "--quilt=$1"; $quilt_mode = $1; diff --git a/dgit.1 b/dgit.1 index 422a363e..993d50b2 100644 --- a/dgit.1 +++ b/dgit.1 @@ -1079,6 +1079,24 @@ and the .B keyid distro config setting. .TP +.RI \fB--curl!:\fR option " | \fB--dput!:\fR" option " |..." +Specifies an option to remove from the command line for +a program called by dgit, as for +\fB--\fR\fIprogram\fI\fB:\fR\fIoption\fR +(and the same caveats apply). + +Any options or arguments exactly identical to +.I option +are removed. +(It is not an error if there were none.) + +This can only be used to delete options +which are always passed by default by dgit, +or to undo a previous +\fB--\fR\fIprogram\fI\fB:\fR\fIoption\fR. +It cannot be used to override option(s) dynamically +decided on by dgit. +.TP .RI \fB--curl=\fR program " | \fB--dput=\fR" program " |..." Specifies alternative programs to use instead of .BR curl ,