Skip to content

Commit 3f02785

Browse files
cousteaulecommandantgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ceadf0f commit 3f02785

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Documentation/git-bisect.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ DESCRIPTION
1616
The command takes various subcommands, and different options depending
1717
on the subcommand:
1818

19-
git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]
19+
git bisect start [--term-(new|bad)=<term-new> --term-(old|good)=<term-old>]
2020
[--no-checkout] [--first-parent] [<bad> [<good>...]] [--] [<paths>...]
2121
git bisect (bad|new|<term-new>) [<rev>]
2222
git bisect (good|old|<term-old>) [<rev>...]
@@ -26,7 +26,7 @@ on the subcommand:
2626
git bisect (visualize|view)
2727
git bisect replay <logfile>
2828
git bisect log
29-
git bisect run <cmd>...
29+
git bisect run <cmd> [<arg>...]
3030
git bisect help
3131

3232
This command uses a binary search algorithm to find which commit in

builtin/bisect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static GIT_PATH_FUNC(git_path_bisect_first_parent, "BISECT_FIRST_PARENT")
2626
static GIT_PATH_FUNC(git_path_bisect_run, "BISECT_RUN")
2727

2828
#define BUILTIN_GIT_BISECT_START_USAGE \
29-
N_("git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]" \
29+
N_("git bisect start [--term-(new|bad)=<term> --term-(old|good)=<term>]" \
3030
" [--no-checkout] [--first-parent] [<bad> [<good>...]] [--]" \
3131
" [<pathspec>...]")
3232
#define BUILTIN_GIT_BISECT_STATE_USAGE \
@@ -46,7 +46,7 @@ static GIT_PATH_FUNC(git_path_bisect_run, "BISECT_RUN")
4646
#define BUILTIN_GIT_BISECT_LOG_USAGE \
4747
"git bisect log"
4848
#define BUILTIN_GIT_BISECT_RUN_USAGE \
49-
N_("git bisect run <cmd>...")
49+
N_("git bisect run <cmd> [<arg>...]")
5050

5151
static const char * const git_bisect_usage[] = {
5252
BUILTIN_GIT_BISECT_START_USAGE,

0 commit comments

Comments
 (0)