Merge branch 'dl/complete-cherry-pick-revert-skip'
[gitweb.git] / git.c
diff --git a/git.c b/git.c
index a43e1dd98ea2170ba3b0d8b86e9130f05fe43080..c1ee7124edcfb0417539134d50212e997dc71c1f 100644 (file)
--- a/git.c
+++ b/git.c
@@ -551,12 +551,7 @@ static struct cmd_struct commands[] = {
        { "push", cmd_push, RUN_SETUP },
        { "range-diff", cmd_range_diff, RUN_SETUP | USE_PAGER },
        { "read-tree", cmd_read_tree, RUN_SETUP | SUPPORT_SUPER_PREFIX},
-       /*
-        * NEEDSWORK: Until the rebase is independent and needs no redirection
-        * to rebase shell script this is kept as is, then should be changed to
-        * RUN_SETUP | NEED_WORK_TREE
-        */
-       { "rebase", cmd_rebase },
+       { "rebase", cmd_rebase, RUN_SETUP | NEED_WORK_TREE },
        { "rebase--interactive", cmd_rebase__interactive, RUN_SETUP | NEED_WORK_TREE },
        { "receive-pack", cmd_receive_pack },
        { "reflog", cmd_reflog, RUN_SETUP },
@@ -567,6 +562,7 @@ static struct cmd_struct commands[] = {
        { "replace", cmd_replace, RUN_SETUP },
        { "rerere", cmd_rerere, RUN_SETUP },
        { "reset", cmd_reset, RUN_SETUP },
+       { "restore", cmd_restore, RUN_SETUP | NEED_WORK_TREE },
        { "rev-list", cmd_rev_list, RUN_SETUP | NO_PARSEOPT },
        { "rev-parse", cmd_rev_parse, NO_PARSEOPT },
        { "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE },
@@ -587,6 +583,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 },
@@ -742,8 +739,6 @@ static int run_argv(int *argcp, const char ***argv)
                 */
                if (!done_alias)
                        handle_builtin(*argcp, *argv);
-
-#if 0 // TODO In GFW, need to amend a7924b655e940b06cb547c235d6bed9767929673 to include trace2_ and _tr2 lines.
                else if (get_builtin(**argv)) {
                        struct argv_array args = ARGV_ARRAY_INIT;
                        int i;
@@ -778,7 +773,6 @@ static int run_argv(int *argcp, const char ***argv)
                                exit(i);
                        die("could not execute builtin %s", **argv);
                }
-#endif // a7924b655e940b06cb547c235d6bed9767929673
 
                /* .. then try the external ones */
                execv_dashed_external(*argv);