From: Tomas Nordin Date: Tue, 09 Jul 2024 23:07:49 GMT Subject: [Tomas Nordin] Re: Unbalanced closing paren in help of git commit Message-ID: <878qyauptm.fsf@posteo.net> In-Reply-To: <8734oj7fnv.fsf@posteo.net> [Sorry, I think I forgot to CC the list when I sent the below message] -------------------- Start of forwarded message -------------------- From: Tomas Nordin To: Junio C Hamano Subject: Re: Unbalanced closing paren in help of git commit Date: Mon, 08 Jul 2024 23:11:16 +0200 Junio C Hamano writes: > Tomas Nordin 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) | --fixup [(amend|reword):])] > > We can have --dry-run but we do not have to, we can have only one of > > "-c " > "-C ", > "--squash ", > "--fixup amend:" > "--fixup reword:", or > "--fixup " > > as they are mutually exclusive, but it is OK if we have none of > them. > > The last closing parenthesis after but before the closing > square bracket is unwanted, I think, as you pointed out. Maybe explicit grouping of the mutually exclusive option-argument pairs is better? Like this: [--dry-run] [((-c | -C | --squash) ) | (--fixup [(amend|reword):])] The closing paren would then make sense. I /think/ this is the way I would have written it. -------------------- End of forwarded message --------------------