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

Re: Unbalanced closing paren in help of git commit

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 8, 2024, 19:57 UTC
Message-ID
<xmqqcynnejwl.fsf@gitster.g>
In-Reply-To
<87o7792xgu.fsf@posteo.net>
Tomas Nordin <tomasn@posteo.net> writes:
> Hello List
>
> The second line of the help message for git commit looks like this:

This seems to have come from 00ea64ed (doc/git-commit: add documentation for fixup=[amend|reword] options, 2021-03-15), if "git blame" is to be trusted.

>     [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>)]
We can have --dry-run but we do not have to, we can have only one of
    "-c <commit>"
    "-C <commit>",
    "--squash <commit>",
    "--fixup amend:<commit>"
    "--fixup reword:<commit>", or
    "--fixup <commit>"

as they are mutually exclusive, but it is OK if we have none of them.

The last closing parenthesis after <commit> but before the closing square bracket is unwanted, I think, as you pointed out.

Previous: Jeff KingNext: Tomas Nordin
Message 5 of 8 in “Unbalanced closing paren in help of git commit”
  1. Tomas NordinJul 7, 2024
  2. Jeff KingJul 8, 2024
  3. Tomas NordinJul 8, 2024
  4. Jeff KingJul 8, 2024
  5. Junio C HamanoJul 8, 2024
  6. Tomas NordinJul 21, 2024
  7. Junio C HamanoJul 22, 2024
  8. Tomas NordinJul 22, 2024

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.