git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: German Lashevich <german.lashevich@gmail.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG
Date: Wed, 14 Jul 2021 17:37:29 -0400	[thread overview]
Message-ID: <YO9ZGTX9f1fOpTkh@coredump.intra.peff.net> (raw)
In-Reply-To: <YO9YyTZdU4WadYGg@coredump.intra.peff.net>

The explanation for the --file option only refers to GIT_CONFIG. This
redirection to an environment variable is confusing, but doubly so
because the description of GIT_CONFIG is out of date.

Let's describe --file from scratch, detailing both the reading and
writing behavior as we do for other similar options like --system, etc.

Signed-off-by: Jeff King <peff@peff.net>
---
The formatting is a bit clunky to read in the source, but I think it
looks OK in the rendered version. At any rate, it's all taken from the
other options, so if we want to improve it, it would make sense to do so
separately on top.

 Documentation/git-config.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 5cddadafd2..193fef2867 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -143,7 +143,13 @@ See also <<FILES>>.
 
 -f config-file::
 --file config-file::
-	Use the given config file instead of the one specified by GIT_CONFIG.
+	For writing options: write to the specified file rather than the
+	repository `.git/config`.
++
+For reading options: read only from the specified file rather than from all
+avialable files.
++
+See also <<FILES>>.
 
 --blob blob::
 	Similar to `--file` but use the given blob instead of a file. E.g.
-- 
2.32.0.689.gbb74d99cdd


  reply	other threads:[~2021-07-14 21:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14 17:10 Bug report: GIT_CONFIG and user.email/name German Lashevich
2021-07-14 18:10 ` Jeff King
2021-07-14 18:26   ` German Lashevich
2021-07-14 20:47   ` Junio C Hamano
2021-07-14 21:36     ` Jeff King
2021-07-14 21:37       ` Jeff King [this message]
2021-07-14 22:20         ` [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG Taylor Blau
2021-07-14 22:23           ` Jeff King
2021-07-14 22:26             ` Taylor Blau
2021-07-20 19:34         ` Martin Ågren
2021-07-20 20:01           ` Jeff King
2021-07-20 20:03             ` Jeff King
2021-07-20 21:55             ` Junio C Hamano
2021-07-14 21:38       ` [PATCH 2/3] doc/git-config: clarify GIT_CONFIG environment variable Jeff King
2021-07-14 21:38       ` [PATCH 3/3] doc/git-config: simplify "override" advice for FILES section Jeff King
2021-07-14 22:22       ` Bug report: GIT_CONFIG and user.email/name Taylor Blau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YO9ZGTX9f1fOpTkh@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=german.lashevich@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).