From: Ian Jackson Date: Sat, 2 May 2015 19:42:45 +0000 (+0100) Subject: Diagnostics: Make shellquote() print empty arguments as '' X-Git-Tag: debian/0.30~192 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=13161881906ef646bf3a40d3ed343cfbdd50657a Diagnostics: Make shellquote() print empty arguments as '' --- diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index e2a503d7..f33b173c 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -107,7 +107,7 @@ sub shellquote { local $_; foreach my $a (@_) { $_ = $a; - if (m{[^-=_./0-9a-z]}i) { + if (!length || m{[^-=_./0-9a-z]}i) { s{['\\]}{'\\$&'}g; push @out, "'$_'"; } else {