Skip to content

Commit af4e5f5

Browse files
committed
Merge branch 'js/branch-track-inherit'
"git branch -h" incorrectly said "--track[=direct|inherit]", implying that "--trackinherit" is a valid option, which has been corrected. * js/branch-track-inherit: branch,checkout: fix --track usage strings
2 parents 0330edb + 15f0028 commit af4e5f5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

builtin/branch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,9 +638,9 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
638638
OPT__VERBOSE(&filter.verbose,
639639
N_("show hash and subject, give twice for upstream branch")),
640640
OPT__QUIET(&quiet, N_("suppress informational messages")),
641-
OPT_CALLBACK_F('t', "track", &track, "direct|inherit",
641+
OPT_CALLBACK_F('t', "track", &track, N_("mode"),
642642
N_("set branch tracking configuration"),
643-
PARSE_OPT_OPTARG | PARSE_OPT_LITERAL_ARGHELP,
643+
PARSE_OPT_OPTARG,
644644
parse_opt_tracking_mode),
645645
OPT_SET_INT_F(0, "set-upstream", &track, N_("do not use"),
646646
BRANCH_TRACK_OVERRIDE, PARSE_OPT_HIDDEN),

builtin/checkout.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,9 +1549,9 @@ static struct option *add_common_switch_branch_options(
15491549
{
15501550
struct option options[] = {
15511551
OPT_BOOL('d', "detach", &opts->force_detach, N_("detach HEAD at named commit")),
1552-
OPT_CALLBACK_F('t', "track", &opts->track, "direct|inherit",
1553-
N_("set up tracking mode (see git-pull(1))"),
1554-
PARSE_OPT_OPTARG | PARSE_OPT_LITERAL_ARGHELP,
1552+
OPT_CALLBACK_F('t', "track", &opts->track, N_("mode"),
1553+
N_("set branch tracking configuration"),
1554+
PARSE_OPT_OPTARG,
15551555
parse_opt_tracking_mode),
15561556
OPT__FORCE(&opts->force, N_("force checkout (throw away local modifications)"),
15571557
PARSE_OPT_NOCOMPLETE),

0 commit comments

Comments
 (0)