{"thread":{"id":"61761","subject":"[Tomas Nordin] Re: Unbalanced closing paren in help of git commit","startedAt":"2024-07-09T23:07:58Z","lastAt":"2024-07-09T23:07:58Z","messageCount":1,"participants":["Tomas Nordin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"498389","messageId":"878qyauptm.fsf@posteo.net","threadId":"61761","inReplyTo":"8734oj7fnv.fsf@posteo.net","subject":"[Tomas Nordin] Re: Unbalanced closing paren in help of git commit","fromName":"Tomas Nordin","fromEmail":"tomasn@posteo.net","sentAt":"2024-07-09T23:07:49Z","receivedAt":"2024-07-09T23:07:58Z","isPatch":false,"sender":{"key":"tomasn@posteo.net","avatar":"https://avatars.githubusercontent.com/u/5942154?v=4"},"body":"[Sorry, I think I forgot to CC the list when I sent the below message]\n\n-------------------- Start of forwarded message --------------------\nFrom: Tomas Nordin <tomasn@posteo.net>\nTo: Junio C Hamano <gitster@pobox.com>\nSubject: Re: Unbalanced closing paren in help of git commit\nDate: Mon, 08 Jul 2024 23:11:16 +0200\n\nJunio C Hamano <gitster@pobox.com> writes:\n\n> Tomas Nordin <tomasn@posteo.net> writes:\n>\n>> Hello List\n>>\n>> The second line of the help message for git commit looks like this:\n>\n> This seems to have come from 00ea64ed (doc/git-commit: add\n> documentation for fixup=[amend|reword] options, 2021-03-15),\n> if \"git blame\" is to be trusted.\n>\n>>     [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>)]\n>\n> We can have --dry-run but we do not have to, we can have only one of\n>\n>     \"-c <commit>\"\n>     \"-C <commit>\",\n>     \"--squash <commit>\",\n>     \"--fixup amend:<commit>\"\n>     \"--fixup reword:<commit>\", or\n>     \"--fixup <commit>\"\n>\n> as they are mutually exclusive, but it is OK if we have none of\n> them.\n>\n> The last closing parenthesis after <commit> but before the closing\n> square bracket is unwanted, I think, as you pointed out.\n\nMaybe explicit grouping of the mutually exclusive option-argument pairs\nis better? Like this:\n\n[--dry-run] [((-c | -C | --squash) <commit>) | (--fixup [(amend|reword):]<commit>)]\n\nThe closing paren would then make sense. I /think/ this is the way I\nwould have written it.\n-------------------- End of forwarded message --------------------\n"}]}