Imported Upstream version 2.27.0
[platform/upstream/git.git] / git.c
diff --git a/git.c b/git.c
index ce6ab0e..a2d337e 100644 (file)
--- a/git.c
+++ b/git.c
@@ -4,6 +4,7 @@
 #include "help.h"
 #include "run-command.h"
 #include "alias.h"
+#include "shallow.h"
 
 #define RUN_SETUP              (1<<0)
 #define RUN_SETUP_GENTLY       (1<<1)
@@ -351,6 +352,7 @@ static int handle_alias(int *argcp, const char ***argv)
 
                        trace2_cmd_alias(alias_command, child.args.argv);
                        trace2_cmd_list_config();
+                       trace2_cmd_list_env_vars();
                        trace2_cmd_name("_run_shell_alias_");
 
                        ret = run_command(&child);
@@ -388,6 +390,7 @@ static int handle_alias(int *argcp, const char ***argv)
 
                trace2_cmd_alias(alias_command, new_argv);
                trace2_cmd_list_config();
+               trace2_cmd_list_env_vars();
 
                *argv = new_argv;
                *argcp += count - 1;
@@ -439,6 +442,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
        trace_argv_printf(argv, "trace: built-in: git");
        trace2_cmd_name(p->cmd);
        trace2_cmd_list_config();
+       trace2_cmd_list_env_vars();
 
        validate_cache_entries(the_repository->index);
        status = p->fn(argc, argv, prefix);
@@ -572,13 +576,9 @@ static struct cmd_struct commands[] = {
        { "show-branch", cmd_show_branch, RUN_SETUP },
        { "show-index", cmd_show_index },
        { "show-ref", cmd_show_ref, RUN_SETUP },
+       { "sparse-checkout", cmd_sparse_checkout, RUN_SETUP | NEED_WORK_TREE },
        { "stage", cmd_add, RUN_SETUP | NEED_WORK_TREE },
-       /*
-        * NEEDSWORK: Until the builtin stash is thoroughly robust and no
-        * longer needs redirection to the stash shell script this is kept as
-        * is, then should be changed to RUN_SETUP | NEED_WORK_TREE
-        */
-       { "stash", cmd_stash },
+       { "stash", cmd_stash, RUN_SETUP | NEED_WORK_TREE },
        { "status", cmd_status, RUN_SETUP | NEED_WORK_TREE },
        { "stripspace", cmd_stripspace },
        { "submodule--helper", cmd_submodule__helper, RUN_SETUP | SUPPORT_SUPER_PREFIX | NO_PARSEOPT },