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

Re: [PATCH] Documentation/git-stash.txt: Adjust SYNOPSIS command syntaxes

From
Jari Aalto <jari.aalto@cante.net>
Date
Feb 1, 2008, 13:06 UTC
Message-ID
<1w7w966m.fsf@blue.sea.net>
In-Reply-To
<m37iho9b70.fsf@localhost.localdomain>
* Fri 2008-02-01 Jakub Narebski <jnareb@gmail.com>
* Message-Id: m37iho9b70.fsf@localhost.localdomain
Show 8 quoted lines
>
>
> 'git-stash' (list | show [<stash>] | apply [<stash>] | clear)
> 'git-stash' [save [<message>...]]
>
> Angle brackets if I understand correctly are meant to denote part
> which you have to enter, the user supplied info (the reast ou have to
> enter literally).

Nowhere I have seen "(" parenheses to mean "required". The angle brackets are commonly used to tell that the part is to be required:

    command <option> <file ...>
Reads:
    command -l file.txt
Whereas this has no known meaning:
    command (option) <file ...>
But this does:
    command [option] <file ...>
That's why I suggested to use:
    git stash <list | show [<stash>] | apply [<stash>] | clear>
    git stash [save [<message>...]]
The nesting of <'s is normal. The above reads:
    1st line: You have to select one command, one of the alternatives
    listed inside <...>: either "list", "show" ...
    2nd line: you can type 'git stash', 'git stash save' or supply
    additional message with the stash.
NOTE:

There exists curly braces notation that is sometimes used for "required" part, but that not very common elsewhere other than printed books from commercial vendors.

    command {one|two|three}

I would hesitate to select parentheses notation, which is relatively unknown to mean "required" in the context of command syntax SYNOPSIS.

>> Welcome to FOSS revolution: we fix and modify until it shines
>
> Nice one. Can I add it to http://git.or.cz/gitwiki/FortuneCookies ?

Sure, Jari

Previous: Jakub NarebskiNext: Jakub Narebski
Message 3 of 19 in “Documentation/git-stash.txt: Adjust SYNOPSIS command syntaxes”
  1. Documentation/git-stash.txt: Adjust SYNOPSIS command syntaxesJari Aalto, Feb 1, 2008
  2. Jakub NarebskiFeb 1, 2008
  3. Jari AaltoFeb 1, 2008
  4. Jakub NarebskiFeb 1, 2008
  5. Jari AaltoFeb 1, 2008
  6. Junio C HamanoFeb 1, 2008
  7. Jari AaltoFeb 2, 2008
  8. Jari AaltoFeb 2, 2008
  9. Jakub NarebskiFeb 2, 2008
  10. Jari AaltoFeb 2, 2008
  11. Jakub NarebskiFeb 2, 2008
  12. Jari AaltoFeb 2, 2008
  13. Jakub NarebskiFeb 2, 2008
  14. Jari AaltoFeb 2, 2008
  15. Jakub NarebskiFeb 2, 2008
  16. Documentation/git-stash.txt: Adjust SYNOPSIS command syntaxJari Aalto, Feb 2, 2008
  17. Junio C HamanoFeb 2, 2008
  18. Jakub NarebskiFeb 2, 2008
  19. Documentation/git-stash.txt: Adjust SYNOPSIS command syntax (2)Jari Aalto, Feb 2, 2008

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.