git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Documentation: git-add: correct first example

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 8, 2010, 20:08 UTC
Message-ID
<7v6367lccu.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vsk9bmt1h.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
>>  and its subdirectories:
>>  +
>>  ------------
>> -$ git add Documentation/\\*.txt
>
> This indeed results in double-backslash in the output.
>
>> +$ git add Documentation/\*.txt
>
> and this seems to fix it.
>
> Thanks.
To look for similar breakages, I ran
    git grep -n -e '\\\\' -- 'Documentation/*.txt'
and found this in git-rm.txt:
    EXAMPLES
    --------
    git rm Documentation/\\*.txt::
            Removes all `\*.txt` files from the index that are under the
            `Documentation` directory and any of its subdirectories.

What is intereseting is that this is rendered correctly. Quoting rule in AsciiDoc is mysterious...

It turns out that the breakage in "git add" documentation was a regression; the examples were written in a similar way to the one in "git rm" documentation. When 921177f (Documentation: improve "add", "pull" and "format-patch" examples, 2008-05-07) converted it to displayed text, nobody noticed that the difference in the backslash quoting rule between the enumeration header and displayed text.

Previous: Junio C Hamano
Message 3 of 3 in “Documentation: git-add: correct first example”
  1. Documentation: git-add: correct first exampleGreg Bacon, Feb 8, 2010
  2. Junio C HamanoFeb 8, 2010
  3. Junio C HamanoFeb 8, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.