Skip to content

Commit 492eded

Browse files
pcloudsgitster
authored andcommitted
switch: remove -l
This option is ancient. Nowadays reflog is enabled by default and automatically created for new branches. Keep it in git-checkout only. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 3ec37ad commit 492eded

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/checkout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,6 @@ static struct option *add_common_switch_branch_options(
13761376
struct checkout_opts *opts, struct option *prevopts)
13771377
{
13781378
struct option options[] = {
1379-
OPT_BOOL('l', NULL, &opts->new_branch_log, N_("create reflog for new branch")),
13801379
OPT_BOOL(0, "detach", &opts->force_detach, N_("detach HEAD at named commit")),
13811380
OPT_SET_INT('t', "track", &opts->track, N_("set upstream info for new branch"),
13821381
BRANCH_TRACK_EXPLICIT),
@@ -1579,6 +1578,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
15791578
N_("create and checkout a new branch")),
15801579
OPT_STRING('B', NULL, &opts.new_branch_force, N_("branch"),
15811580
N_("create/reset and checkout a branch")),
1581+
OPT_BOOL('l', NULL, &opts.new_branch_log, N_("create reflog for new branch")),
15821582
OPT_END()
15831583
};
15841584
int ret;

0 commit comments

Comments
 (0)