{"thread":{"id":"22571","subject":"[PATCH] Documentation: git-add: correct first example","startedAt":"2010-02-08T17:35:51Z","lastAt":"2010-02-08T20:08:17Z","messageCount":3,"participants":["Greg Bacon","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"133935","messageId":"1265650551-32664-1-git-send-email-gbacon@dbresearch.net","threadId":"22571","inReplyTo":null,"subject":"[PATCH] Documentation: git-add: correct first example","fromName":"Greg Bacon","fromEmail":"gbacon@dbresearch.net","sentAt":"2010-02-08T17:35:51Z","receivedAt":"2010-02-08T17:35:51Z","isPatch":true,"sender":{"key":"gbacon@dbresearch.net","avatar":"https://gravatar.com/avatar/5a2159cfb8b094827dd626b7d9b8d244c03ebdac365ff5c6721e8519a4760981?d=mp&s=160"},"body":"The first example for git-add covers recursive adding of patterns but\ncontains an extra backslash. If copied verbatim, the command fails\nwith\n\nfatal: pathspec 'Documentation/\\*.txt' did not match any files\n\nThis patch corrects the problem and adds an equivalent invocation.\n\nSigned-off-by: Greg Bacon <gbacon@dbresearch.net>\n---\n Documentation/git-add.txt |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-add.txt b/Documentation/git-add.txt\nindex f74fcf3..93e8f57 100644\n--- a/Documentation/git-add.txt\n+++ b/Documentation/git-add.txt\n@@ -149,11 +149,12 @@ those in info/exclude.  See linkgit:gitrepository-layout[5].\n EXAMPLES\n --------\n \n-* Adds content from all `\\*.txt` files under `Documentation` directory\n+* Adds content from all `*.txt` files under `Documentation` directory\n and its subdirectories:\n +\n ------------\n-$ git add Documentation/\\\\*.txt\n+$ git add Documentation/\\*.txt\n+$ git add 'Documentation/*.txt'  # same thing\n ------------\n +\n Note that the asterisk `\\*` is quoted from the shell in this\n-- \n1.6.5.5\n"},{"id":"133939","messageId":"7vsk9bmt1h.fsf@alter.siamese.dyndns.org","threadId":"22571","inReplyTo":"1265650551-32664-1-git-send-email-gbacon@dbresearch.net","subject":"Re: [PATCH] Documentation: git-add: correct first example","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-02-08T19:22:34Z","receivedAt":"2010-02-08T19:22:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Greg Bacon <gbacon@dbresearch.net> writes:\n\n> The first example for git-add covers recursive adding of patterns but\n> contains an extra backslash.\n\nCorrect.  \n\n> Signed-off-by: Greg Bacon <gbacon@dbresearch.net>\n> ---\n>  Documentation/git-add.txt |    5 +++--\n>  1 files changed, 3 insertions(+), 2 deletions(-)\n>\n> diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt\n> index f74fcf3..93e8f57 100644\n> --- a/Documentation/git-add.txt\n> +++ b/Documentation/git-add.txt\n> @@ -149,11 +149,12 @@ those in info/exclude.  See linkgit:gitrepository-layout[5].\n>  EXAMPLES\n>  --------\n>  \n> -* Adds content from all `\\*.txt` files under `Documentation` directory\n> +* Adds content from all `*.txt` files under `Documentation` directory\n\nFor this, both\n\n    http://www.kernel.org/pub/software/scm/git/docs/git-add.html\n\nand output from\n\n    git help add\n\nin my local build seem to be rendered correctly by AsciiDoc.\n\n>  and its subdirectories:\n>  +\n>  ------------\n> -$ git add Documentation/\\\\*.txt\n\nThis indeed results in double-backslash in the output.\n\n> +$ git add Documentation/\\*.txt\n\nand this seems to fix it.\n\nThanks.\n"},{"id":"133942","messageId":"7v6367lccu.fsf@alter.siamese.dyndns.org","threadId":"22571","inReplyTo":"7vsk9bmt1h.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Documentation: git-add: correct first example","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-02-08T20:08:17Z","receivedAt":"2010-02-08T20:08:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>>  and its subdirectories:\n>>  +\n>>  ------------\n>> -$ git add Documentation/\\\\*.txt\n>\n> This indeed results in double-backslash in the output.\n>\n>> +$ git add Documentation/\\*.txt\n>\n> and this seems to fix it.\n>\n> Thanks.\n\nTo look for similar breakages, I ran\n\n    git grep -n -e '\\\\\\\\' -- 'Documentation/*.txt'\n\nand found this in git-rm.txt:\n\n    EXAMPLES\n    --------\n    git rm Documentation/\\\\*.txt::\n            Removes all `\\*.txt` files from the index that are under the\n            `Documentation` directory and any of its subdirectories.\n\nWhat is intereseting is that this is rendered correctly.  Quoting rule in\nAsciiDoc is mysterious...\n\nIt turns out that the breakage in \"git add\" documentation was a\nregression; the examples were written in a similar way to the one in \"git\nrm\" documentation.  When 921177f (Documentation: improve \"add\", \"pull\" and\n\"format-patch\" examples, 2008-05-07) converted it to displayed text,\nnobody noticed that the difference in the backslash quoting rule between\nthe enumeration header and displayed text.\n"}]}