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
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-01-26 01:19:19 +0300
committerJunio C Hamano <gitster@pobox.com>2021-01-26 01:19:19 +0300
commit294e949fa2dfd43097b2b5614470a3e43604663d (patch)
tree05965a5fb1413fbf6c896aa8494338af676228c4 /Documentation/git-config.txt
parent7eefa1349bcba7f4bb533f6e04f472c27b16ea83 (diff)
parentd8d77153eafdb0fc334e827976f09e4bdff26b58 (diff)
Merge branch 'ps/config-env-pairs'
Introduce two new ways to feed configuration variable-value pairs via environment variables, and tweak the way GIT_CONFIG_PARAMETERS encodes variable/value pairs to make it more robust. * ps/config-env-pairs: config: allow specifying config entries via envvar pairs environment: make `getenv_safe()` a public function config: store "git -c" variables using more robust format config: parse more robust format in GIT_CONFIG_PARAMETERS config: extract function to parse config pairs quote: make sq_dequote_step() a public function config: add new way to pass config via `--config-env` git: add `--super-prefix` to usage string
Diffstat (limited to 'Documentation/git-config.txt')
-rw-r--r--Documentation/git-config.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 0e9351d3cb..4b4cc5c5e8 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -346,6 +346,22 @@ GIT_CONFIG_NOSYSTEM::
See also <<FILES>>.
+GIT_CONFIG_COUNT::
+GIT_CONFIG_KEY_<n>::
+GIT_CONFIG_VALUE_<n>::
+ If GIT_CONFIG_COUNT is set to a positive number, all environment pairs
+ GIT_CONFIG_KEY_<n> and GIT_CONFIG_VALUE_<n> up to that number will be
+ added to the process's runtime configuration. The config pairs are
+ zero-indexed. Any missing key or value is treated as an error. An empty
+ GIT_CONFIG_COUNT is treated the same as GIT_CONFIG_COUNT=0, namely no
+ pairs are processed. These environment variables will override values
+ in configuration files, but will be overridden by any explicit options
+ passed via `git -c`.
++
+This is useful for cases where you want to spawn multiple git commands
+with a common configuration but cannot depend on a configuration file,
+for example when writing scripts.
+
[[EXAMPLES]]
EXAMPLES