From: Eric Sunshine <sunshine@sunshineco.com>
To: cousteau via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>,
Javier Mora <cousteaulecommandant@gmail.com>
Subject: Re: [PATCH v2] doc/git-bisect: clarify `git bisect run` syntax
Date: Mon, 23 Oct 2023 15:36:31 -0400 [thread overview]
Message-ID: <CAPig+cQuBwzaG7ZssGUY6k8wf8pcGZHAGLnbRy579uTPMKqwKQ@mail.gmail.com> (raw)
In-Reply-To: <pull.1602.v2.git.1698088990478.gitgitgadget@gmail.com>
On Mon, Oct 23, 2023 at 3:23 PM cousteau via GitGitGadget
<gitgitgadget@gmail.com> 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 <cmd>...`, which isn't quite clear
> about what `<cmd>` 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 <cmd> [<arg>...]` 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 <cousteaulecommandant@gmail.com>
> ---
> diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
> @@ -16,7 +16,7 @@ DESCRIPTION
> - git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]
> + git bisect start [--term-(new|bad)=<term-new> --term-(old|good)=<term-old>]
> [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] [<paths>...]
> git bisect (bad|new|<term-new>) [<rev>]
> git bisect (good|old|<term-old>) [<rev>...]
Upon first reading, I questioned whether changing <term> to <term-new>
and <term-old> adds value since the option names --term-new and
--term-old already provide enough context for the reader to understand
the generic placeholder <term>. However, then I noticed that the
following two lines are already referencing placeholders <term-new>
and <term-old>, 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> --term-{old,good}=<term>]" \
> + N_("git bisect start [--term-(new|bad)=<term> --term-(old|good)=<term>]" \
...now we have an inconsistency again since this text just uses the
generic <term>. However, I haven't convinced myself that we need to
care about this inconsistency.
next prev parent reply other threads:[~2023-10-23 19:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-22 20:02 [PATCH] doc/git-bisect: clarify `git bisect run` syntax cousteau via GitGitGadget
2023-10-22 21:32 ` Eric Sunshine
2023-10-23 0:35 ` Junio C Hamano
2023-10-23 7:38 ` Patrick Steinhardt
2023-10-23 16:27 ` Javier Mora
2023-10-23 17:46 ` Junio C Hamano
2023-10-23 17:23 ` Junio C Hamano
2023-10-23 19:23 ` [PATCH v2] " cousteau via GitGitGadget
2023-10-23 19:36 ` Eric Sunshine [this message]
2023-10-23 22:53 ` Javier Mora
2023-10-23 23:18 ` Eric Sunshine
2023-10-24 0:12 ` Junio C Hamano
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=CAPig+cQuBwzaG7ZssGUY6k8wf8pcGZHAGLnbRy579uTPMKqwKQ@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=cousteaulecommandant@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).