Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-05-07 06:47:37 +0300
committerJunio C Hamano <gitster@pobox.com>2021-05-07 06:47:37 +0300
commit5f586f55a02b98d7a2a9c770d33e8170ca563e43 (patch)
tree8996793f2c451ce84549cf710ce4a0b783124eac /git.c
parent7e391989789db82983665667013a46eabc6fc570 (diff)
parentc331551ccf9a4c8922ff5d2987eed9e218479000 (diff)
Merge branch 'ps/config-env-option-with-separate-value'
"git --config-env var=val cmd" weren't accepted (only --config-env=var=val was). * ps/config-env-option-with-separate-value: git: support separate arg for `--config-env`'s value git.txt: fix synopsis of `--config-env` missing the equals sign
Diffstat (limited to 'git.c')
-rw-r--r--git.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/git.c b/git.c
index 06d681cd59..18bed9a996 100644
--- a/git.c
+++ b/git.c
@@ -255,6 +255,14 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
git_config_push_parameter((*argv)[1]);
(*argv)++;
(*argc)--;
+ } else if (!strcmp(cmd, "--config-env")) {
+ if (*argc < 2) {
+ fprintf(stderr, _("no config key given for --config-env\n" ));
+ usage(git_usage_string);
+ }
+ git_config_push_env((*argv)[1]);
+ (*argv)++;
+ (*argc)--;
} else if (skip_prefix(cmd, "--config-env=", &cmd)) {
git_config_push_env(cmd);
} else if (!strcmp(cmd, "--literal-pathspecs")) {