1
0
mirror of https://github.com/git/git.git synced 2024-11-16 00:53:09 +01:00

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.

Signed-off-by: Javier Mora <cousteaulecommandant@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Javier Mora 2023-10-23 19:23:10 +00:00 committed by Junio C Hamano
parent ceadf0f3cf
commit 3f02785de9
2 changed files with 4 additions and 4 deletions

@ -16,7 +16,7 @@ DESCRIPTION
The command takes various subcommands, and different options depending The command takes various subcommands, and different options depending
on the subcommand: on the subcommand:
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>...] [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] [<paths>...]
git bisect (bad|new|<term-new>) [<rev>] git bisect (bad|new|<term-new>) [<rev>]
git bisect (good|old|<term-old>) [<rev>...] git bisect (good|old|<term-old>) [<rev>...]
@ -26,7 +26,7 @@ on the subcommand:
git bisect (visualize|view) git bisect (visualize|view)
git bisect replay <logfile> git bisect replay <logfile>
git bisect log git bisect log
git bisect run <cmd>... git bisect run <cmd> [<arg>...]
git bisect help git bisect help
This command uses a binary search algorithm to find which commit in This command uses a binary search algorithm to find which commit in

@ -26,7 +26,7 @@ static GIT_PATH_FUNC(git_path_bisect_first_parent, "BISECT_FIRST_PARENT")
static GIT_PATH_FUNC(git_path_bisect_run, "BISECT_RUN") static GIT_PATH_FUNC(git_path_bisect_run, "BISECT_RUN")
#define BUILTIN_GIT_BISECT_START_USAGE \ #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>]" \
" [--no-checkout] [--first-parent] [<bad> [<good>...]] [--]" \ " [--no-checkout] [--first-parent] [<bad> [<good>...]] [--]" \
" [<pathspec>...]") " [<pathspec>...]")
#define BUILTIN_GIT_BISECT_STATE_USAGE \ #define BUILTIN_GIT_BISECT_STATE_USAGE \
@ -46,7 +46,7 @@ static GIT_PATH_FUNC(git_path_bisect_run, "BISECT_RUN")
#define BUILTIN_GIT_BISECT_LOG_USAGE \ #define BUILTIN_GIT_BISECT_LOG_USAGE \
"git bisect log" "git bisect log"
#define BUILTIN_GIT_BISECT_RUN_USAGE \ #define BUILTIN_GIT_BISECT_RUN_USAGE \
N_("git bisect run <cmd>...") N_("git bisect run <cmd> [<arg>...]")
static const char * const git_bisect_usage[] = { static const char * const git_bisect_usage[] = {
BUILTIN_GIT_BISECT_START_USAGE, BUILTIN_GIT_BISECT_START_USAGE,