]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git.c
The fifth batch
[thirdparty/git.git] / git.c
diff --git a/git.c b/git.c
index 5265f920f165d99f01584eed54554dd51563acca..637c61ca9ce3c799a69b799af3563a722b0e248f 100644 (file)
--- a/git.c
+++ b/git.c
@@ -36,9 +36,10 @@ struct cmd_struct {
 const char git_usage_string[] =
        N_("git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]\n"
           "           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
-          "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]\n"
-          "           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
-          "           [--config-env=<name>=<envvar>] <command> [<args>]");
+          "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-lazy-fetch]\n"
+          "           [--no-optional-locks] [--no-advice] [--bare] [--git-dir=<path>]\n"
+          "           [--work-tree=<path>] [--namespace=<name>] [--config-env=<name>=<envvar>]\n"
+          "           <command> [<args>]");
 
 const char git_more_info_string[] =
        N_("'git help -a' and 'git help -g' list available subcommands and some\n"
@@ -337,6 +338,10 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
                        setenv(GIT_ATTR_SOURCE_ENVIRONMENT, cmd, 1);
                        if (envchanged)
                                *envchanged = 1;
+               } else if (!strcmp(cmd, "--no-advice")) {
+                       setenv(GIT_ADVICE_ENVIRONMENT, "0", 1);
+                       if (envchanged)
+                               *envchanged = 1;
                } else {
                        fprintf(stderr, _("unknown option: %s\n"), cmd);
                        usage(git_usage_string);
@@ -379,8 +384,6 @@ static int handle_alias(int *argcp, const char ***argv)
                        strvec_pushv(&child.args, (*argv) + 1);
 
                        trace2_cmd_alias(alias_command, child.args.v);
-                       trace2_cmd_list_config();
-                       trace2_cmd_list_env_vars();
                        trace2_cmd_name("_run_shell_alias_");
 
                        ret = run_command(&child);
@@ -417,8 +420,6 @@ static int handle_alias(int *argcp, const char ***argv)
                COPY_ARRAY(new_argv + count, *argv + 1, *argcp);
 
                trace2_cmd_alias(alias_command, new_argv);
-               trace2_cmd_list_config();
-               trace2_cmd_list_env_vars();
 
                *argv = new_argv;
                *argcp += count - 1;
@@ -468,8 +469,6 @@ 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);