From: Eric Sunshine Date: Mon, 23 Oct 2023 19:36:31 GMT Subject: Re: [PATCH v2] doc/git-bisect: clarify `git bisect run` syntax Message-ID: In-Reply-To: On Mon, Oct 23, 2023 at 3:23 PM cousteau via GitGitGadget wrote: > doc/git-bisect: clarify `git bisect run` syntax > > The description of the `git bisect run` command syntax at the beginning > of the manpage is `git bisect run ...`, which isn't quite clear > about what `` is or what the `...` mean; one could think that it is > the whole (quoted) command line with all arguments in a single string, > or that it supports multiple commands, or that it doesn't accept > commands with arguments at all. > > Change to `git bisect run [...]` to clarify the syntax, > in both the manpage and the `git bisect -h` command output. > > Additionally, change `--term-{new,bad}` et al to `--term-(new|bad)` > for consistency with the synopsis syntax conventions. Makes sense to fix this inconsistency, as well, though the patch subject becomes a bit outdated with this addition. > Signed-off-by: Javier Mora > --- > diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt > @@ -16,7 +16,7 @@ DESCRIPTION > - git bisect start [--term-{new,bad}= --term-{old,good}=] > + git bisect start [--term-(new|bad)= --term-(old|good)=] > [--no-checkout] [--first-parent] [ [...]] [--] [...] > git bisect (bad|new|) [] > git bisect (good|old|) [...] Upon first reading, I questioned whether changing to and adds value since the option names --term-new and --term-old already provide enough context for the reader to understand the generic placeholder . However, then I noticed that the following two lines are already referencing placeholders and , so perhaps this change makes sense. But... > diff --git a/builtin/bisect.c b/builtin/bisect.c > @@ -26,7 +26,7 @@ static GIT_PATH_FUNC(git_path_bisect_first_parent, "BISECT_FIRST_PARENT") > #define BUILTIN_GIT_BISECT_START_USAGE \ > - N_("git bisect start [--term-{new,bad}= --term-{old,good}=]" \ > + N_("git bisect start [--term-(new|bad)= --term-(old|good)=]" \ ...now we have an inconsistency again since this text just uses the generic . However, I haven't convinced myself that we need to care about this inconsistency.