]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git.c
Merge branch 'en/ort-perf-batch-9'
[thirdparty/git.git] / git.c
diff --git a/git.c b/git.c
index a00a0a4d941261b8f7d39390d6f518197f38be15..9bc077a025cba4c5b3628b0eabb4d3aac0f35c63 100644 (file)
--- a/git.c
+++ b/git.c
@@ -29,6 +29,7 @@ const char git_usage_string[] =
           "           [--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"
+          "           [--super-prefix=<path>] [--config-env=<name>=<envvar>]\n"
           "           <command> [<args>]");
 
 const char git_more_info_string[] =
@@ -254,6 +255,8 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
                        git_config_push_parameter((*argv)[1]);
                        (*argv)++;
                        (*argc)--;
+               } else if (skip_prefix(cmd, "--config-env=", &cmd)) {
+                       git_config_push_env(cmd);
                } else if (!strcmp(cmd, "--literal-pathspecs")) {
                        setenv(GIT_LITERAL_PATHSPECS_ENVIRONMENT, "1", 1);
                        if (envchanged)
@@ -420,7 +423,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
                        int nongit_ok;
                        prefix = setup_git_directory_gently(&nongit_ok);
                }
-
+               prefix = precompose_argv_prefix(argc, argv, prefix);
                if (use_pager == -1 && p->option & (RUN_SETUP | RUN_SETUP_GENTLY) &&
                    !(p->option & DELAY_PAGER_CONFIG))
                        use_pager = check_pager_config(p->cmd);