{"thread":{"id":"45129","subject":"[PATCH] docs/gitremote-helpers: fix unbalanced quotes","startedAt":"2017-02-13T20:38:48Z","lastAt":"2017-02-13T22:06:36Z","messageCount":3,"participants":["Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"311432","messageId":"20170213203835.vssj64tcvuq35dny@sigill.intra.peff.net","threadId":"45129","inReplyTo":null,"subject":"[PATCH] docs/gitremote-helpers: fix unbalanced quotes","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-02-13T20:38:35Z","receivedAt":"2017-02-13T20:38:48Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Each of these options is missing the closing single-quote on\nthe option name. This understandably confuses asciidoc,\nwhich ends up rendering a stray quote, like:\n\n  option cloning {'true|false}\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n Documentation/gitremote-helpers.txt | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/gitremote-helpers.txt b/Documentation/gitremote-helpers.txt\nindex 9e8681f9e..7e59c50b1 100644\n--- a/Documentation/gitremote-helpers.txt\n+++ b/Documentation/gitremote-helpers.txt\n@@ -452,14 +452,14 @@ set by Git if the remote helper has the 'option' capability.\n \tRequest the helper to perform a force update.  Defaults to\n \t'false'.\n \n-'option cloning {'true'|'false'}::\n+'option cloning' {'true'|'false'}::\n \tNotify the helper this is a clone request (i.e. the current\n \trepository is guaranteed empty).\n \n-'option update-shallow {'true'|'false'}::\n+'option update-shallow' {'true'|'false'}::\n \tAllow to extend .git/shallow if the new refs require it.\n \n-'option pushcert {'true'|'false'}::\n+'option pushcert' {'true'|'false'}::\n \tGPG sign pushes.\n \n SEE ALSO\n-- \n2.12.0.rc1.466.g70234cfd8\n"},{"id":"311443","messageId":"20170213210549.jns7asrvjp3lb5wc@sigill.intra.peff.net","threadId":"45129","inReplyTo":"20170213203835.vssj64tcvuq35dny@sigill.intra.peff.net","subject":"[PATCH] docs/git-submodule: fix unbalanced quote","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-02-13T21:05:49Z","receivedAt":"2017-02-13T21:05:56Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The documentation gives an example of the submodule foreach\ncommand that uses both backticks and single-quotes. We stick\nthe whole thing inside \"+\" markers to make it monospace, but\nthe inside punctuation still needs escaping. We handle the\nbackticks with \"{backtick}\", and use backslash-escaping for\nthe single-quotes.\n\nBut we missed the escaping on the second quote. Fortunately,\nasciidoc renders this unbalanced quote as we want (showing\nthe quote), but asciidoctor does not. We could fix it by\nadding the missing backslash.\n\nHowever, let's take a step back. Even when rendered\ncorrectly, it's hard to read a long command stuck into the\nmiddle of a paragraph, and the important punctuation is hard\nto notice. Let's instead bump it into its own single-line\ncode block. That makes both the source and the rendered\nresult more readable, and as a bonus we don't have to worry\nabout quoting at all.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nNot textually related to the previous fix, but obviously along the same\nlines.\n\n Documentation/git-submodule.txt | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt\nindex 918bd1d1b..a8eb1c7ce 100644\n--- a/Documentation/git-submodule.txt\n+++ b/Documentation/git-submodule.txt\n@@ -228,9 +228,12 @@ foreach::\n \tthe processing to terminate. This can be overridden by adding '|| :'\n \tto the end of the command.\n +\n-As an example, +git submodule foreach \\'echo $path {backtick}git\n-rev-parse HEAD{backtick}'+ will show the path and currently checked out\n-commit for each submodule.\n+As an example, the command below will show the path and currently\n+checked out commit for each submodule:\n++\n+--------------\n+git submodule foreach 'echo $path `git rev-parse HEAD`'\n+--------------\n \n sync::\n \tSynchronizes submodules' remote URL configuration setting\n-- \n2.12.0.rc1.466.g70234cfd8\n\n"},{"id":"311456","messageId":"xmqqtw7xbva2.fsf@gitster.mtv.corp.google.com","threadId":"45129","inReplyTo":"20170213210549.jns7asrvjp3lb5wc@sigill.intra.peff.net","subject":"Re: [PATCH] docs/git-submodule: fix unbalanced quote","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-02-13T22:06:29Z","receivedAt":"2017-02-13T22:06:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> However, let's take a step back. Even when rendered\n> correctly, it's hard to read a long command stuck into the\n> middle of a paragraph, and the important punctuation is hard\n> to notice.\n\nYes, I like this reasoning behind the solution very much.\n\nThanks.\n\n>  Documentation/git-submodule.txt | 9 ++++++---\n>  1 file changed, 6 insertions(+), 3 deletions(-)\n>\n> diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt\n> index 918bd1d1b..a8eb1c7ce 100644\n> --- a/Documentation/git-submodule.txt\n> +++ b/Documentation/git-submodule.txt\n> @@ -228,9 +228,12 @@ foreach::\n>  \tthe processing to terminate. This can be overridden by adding '|| :'\n>  \tto the end of the command.\n>  +\n> -As an example, +git submodule foreach \\'echo $path {backtick}git\n> -rev-parse HEAD{backtick}'+ will show the path and currently checked out\n> -commit for each submodule.\n> +As an example, the command below will show the path and currently\n> +checked out commit for each submodule:\n> ++\n> +--------------\n> +git submodule foreach 'echo $path `git rev-parse HEAD`'\n> +--------------\n>  \n>  sync::\n>  \tSynchronizes submodules' remote URL configuration setting\n"}]}