diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-01-10 11:52:54 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-01-10 11:52:54 -0800 |
| commit | 0669bdf4ebc095a2b26654292e1ff38245ccf88a (patch) | |
| tree | e1cbee05b782fabade7aefc3767ffdbf28f75dfd /builtin/checkout.c | |
| parent | 4b51386bbfc5d26e552c3c4be135e31cd2f64b44 (diff) | |
| parent | 44f14a9d24cd9f04a0a789e58968d52d44d7f332 (diff) | |
| download | git-0669bdf4ebc095a2b26654292e1ff38245ccf88a.tar.xz | |
Merge branch 'js/branch-track-inherit'
"git -c branch.autosetupmerge=inherit branch new old" makes "new"
to have the same upstream as the "old" branch, instead of marking
"old" itself as its upstream.
* js/branch-track-inherit:
config: require lowercase for branch.*.autosetupmerge
branch: add flags and config to inherit tracking
branch: accept multiple upstream branches for tracking
Diffstat (limited to 'builtin/checkout.c')
| -rw-r--r-- | builtin/checkout.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index 72beeb49aa..bbbfabb871 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1549,8 +1549,10 @@ static struct option *add_common_switch_branch_options( { struct option options[] = { OPT_BOOL('d', "detach", &opts->force_detach, N_("detach HEAD at named commit")), - OPT_SET_INT('t', "track", &opts->track, N_("set upstream info for new branch"), - BRANCH_TRACK_EXPLICIT), + OPT_CALLBACK_F('t', "track", &opts->track, "direct|inherit", + N_("set up tracking mode (see git-pull(1))"), + PARSE_OPT_OPTARG | PARSE_OPT_LITERAL_ARGHELP, + parse_opt_tracking_mode), OPT__FORCE(&opts->force, N_("force checkout (throw away local modifications)"), PARSE_OPT_NOCOMPLETE), OPT_STRING(0, "orphan", &opts->new_orphan_branch, N_("new-branch"), N_("new unparented branch")), |
