Subject: Re: [PATCH v5 8/8] config: allow specifying config entries via envvar pairs

From: Junio C Hamano <[email-masked]>
Date: Wed, 23 Dec 2020 13:55:08 -0800

Junio C Hamano <[email-masked]> writes:

> The same problem may exist in new paragraphs in git.txt that
> describes the "--config-env" stuff.

Here is what I tentatively queued on top of these 8 patches as a fixup.

Thanks.

 Documentation/git-config.txt |  8 ++++----
 Documentation/git.txt        | 29 +++++++++++++++--------------
 2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index b71c1ac7b8..67eb40f506 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -348,10 +348,10 @@ GIT_CONFIG_VALUE_<n>::
 	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.
++
+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]]
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 80fb8fab11..3b0f87a71b 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -81,25 +81,26 @@ foo.bar= ...`) sets `foo.bar` to the empty string which `git config
 --type=bool` will convert to `false`.
 
 --config-env=<name>=<envvar>::
-	Like `-c <name>=<var>` except the value is the name of an
+	Like `-c <name>=<value>`, give configuration variable
+	'<name>' a value, where <envvar> is the name of an
 	environment variable from which to retrieve the value. Unlike
 	`-c` there is no shortcut for directly setting the value to an
 	empty string, instead the environment variable itself must be
-	set to the empty strin. Errors if the `<envvar>` does not exist
+	set to the empty string.  It is an error if the `<envvar>` does not exist
 	in the environment. `<envvar>` may not contain an equals sign
 	to avoid ambiguity with `<name>`s which contain one.
-
-	This is useful for cases where you want to pass transitory
-	configuration options to git, but are doing so on OS's where
-	other processes might be able to read your cmdline
-	(e.g. `/proc/self/cmdline`), but not your environ
-	(e.g. `/proc/self/environ`). That behavior is the default on
-	Linux, but may not be on your system.
-
-	Note that this might add security for variables such as
-	`http.extraHeader` where the sensitive information is part of
-	the value, but not e.g. `url.<base.insteadOf` where the
-	sensitive information can be part of the key.
++
+This is useful for cases where you want to pass transitory
+configuration options to git, but are doing so on OS's where
+other processes might be able to read your cmdline
+(e.g. `/proc/self/cmdline`), but not your environ
+(e.g. `/proc/self/environ`). That behavior is the default on
+Linux, but may not be on your system.
++
+Note that this might add security for variables such as
+`http.extraHeader` where the sensitive information is part of
+the value, but not e.g. `url.<base>.insteadOf` where the
+sensitive information can be part of the key.
 
 --exec-path[=<path>]::
 	Path to wherever your core Git programs are installed.
-- 
2.30.0-rc1-197-ga312a798fc