public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Tomas Nordin <tomasn@posteo•net>
To: git@vger•kernel.org
Subject: [Tomas Nordin] Re: Unbalanced closing paren in help of git commit
Date: Tue, 09 Jul 2024 23:07:49 +0000	[thread overview]
Message-ID: <878qyauptm.fsf@posteo.net> (raw)
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 <tomasn@posteo•net>
To: Junio C Hamano <gitster@pobox•com>
Subject: Re: Unbalanced closing paren in help of git commit
Date: Mon, 08 Jul 2024 23:11:16 +0200

Junio C Hamano <gitster@pobox•com> writes:

> 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.

Maybe explicit grouping of the mutually exclusive option-argument pairs
is better? Like this:

[--dry-run] [((-c | -C | --squash) <commit>) | (--fixup [(amend|reword):]<commit>)]

The closing paren would then make sense. I /think/ this is the way I
would have written it.
-------------------- End of forwarded message --------------------

           reply	other threads:[~2024-07-09 23:07 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <8734oj7fnv.fsf@posteo.net>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878qyauptm.fsf@posteo.net \
    --to=tomasn@posteo$(echo .)net \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox