{"thread":{"id":"47406","subject":"[PATCH] cvsimport: apply shell-quoting regex globally","startedAt":"2017-12-08T10:01:05Z","lastAt":"2017-12-08T10:01:05Z","messageCount":1,"participants":["Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"334405","messageId":"20171208095819.GA1899@sigill.intra.peff.net","threadId":"47406","inReplyTo":null,"subject":"[PATCH] cvsimport: apply shell-quoting regex globally","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-12-08T09:58:19Z","receivedAt":"2017-12-08T10:01:05Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Commit 5b4efea666 (cvsimport: shell-quote variable used in\nbackticks, 2017-09-11) tried to shell-quote a variable, but\nforgot to use the \"/g\" modifier to apply the quoting to the\nwhole variable. This means we'd miss any embedded\nsingle-quotes after the first one.\n\nReported-by: <littlelailo@yahoo.com>\nSigned-off-by: Jeff King <peff@peff.net>\n---\n git-cvsimport.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex 36929921ea..2d8df83172 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -642,7 +642,7 @@ sub is_sha1 {\n \n sub get_headref ($) {\n \tmy $name = shift;\n-\t$name =~ s/'/'\\\\''/;\n+\t$name =~ s/'/'\\\\''/g;\n \tmy $r = `git rev-parse --verify '$name' 2>/dev/null`;\n \treturn undef unless $? == 0;\n \tchomp $r;\n-- \n2.15.1.659.g8bd2eae3ea\n"}]}