checkout: split part of it to new command 'switch'
"git checkout" doing too many things is a source of confusion for many users (and it even bites old timers sometimes). To remedy that, the command will be split into two new ones: switch and restore. The good old "git checkout" command is still here and will be until all (or most of users) are sick of it. See the new man page for the final design of switch. The actual implementation though is still pretty much the same as "git checkout" and not completely aligned with the man page. Following patches will adjust their behavior to match the man page. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
2087182272
commit
d787d311db
1
git.c
1
git.c
@ -573,6 +573,7 @@ static struct cmd_struct commands[] = {
|
||||
{ "status", cmd_status, RUN_SETUP | NEED_WORK_TREE },
|
||||
{ "stripspace", cmd_stripspace },
|
||||
{ "submodule--helper", cmd_submodule__helper, RUN_SETUP | SUPPORT_SUPER_PREFIX | NO_PARSEOPT },
|
||||
{ "switch", cmd_switch, RUN_SETUP | NEED_WORK_TREE },
|
||||
{ "symbolic-ref", cmd_symbolic_ref, RUN_SETUP },
|
||||
{ "tag", cmd_tag, RUN_SETUP | DELAY_PAGER_CONFIG },
|
||||
{ "unpack-file", cmd_unpack_file, RUN_SETUP | NO_PARSEOPT },
|
||||
|
Reference in New Issue
Block a user