summaryrefslogtreecommitdiff
path: root/git-cvsimport.perl
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-12-08 09:58:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-12-08 17:02:54 (GMT)
commit8c87bdfb2137c9e9e945df13e2f2e1eb995ddf83 (patch)
treef4791ea6f751e1e827d02c3ab875faf50abb3ce5 /git-cvsimport.perl
parent5b4efea666951efe0770f8d5a301f8917015315f (diff)
downloadgit-8c87bdfb2137c9e9e945df13e2f2e1eb995ddf83.zip
git-8c87bdfb2137c9e9e945df13e2f2e1eb995ddf83.tar.gz
git-8c87bdfb2137c9e9e945df13e2f2e1eb995ddf83.tar.bz2
cvsimport: apply shell-quoting regex globally
Commit 5b4efea666 (cvsimport: shell-quote variable used in backticks, 2017-09-11) tried to shell-quote a variable, but forgot to use the "/g" modifier to apply the quoting to the whole variable. This means we'd miss any embedded single-quotes after the first one. Reported-by: <littlelailo@yahoo.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-xgit-cvsimport.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 3692992..2d8df83 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -642,7 +642,7 @@ sub is_sha1 {
sub get_headref ($) {
my $name = shift;
- $name =~ s/'/'\\''/;
+ $name =~ s/'/'\\''/g;
my $r = `git rev-parse --verify '$name' 2>/dev/null`;
return undef unless $? == 0;
chomp $r;