From: Junio C Hamano <gitster@pobox.com>
To: Florian Achleitner <florian.achleitner2.6.31@gmail.com>
Cc: git@vger.kernel.org, davidbarr@google.com,
florian.achleitner.2.6.31@gmail.com, jrnieder@gmail.com
Subject: Re: [PATCH] Update Documentation/git-config to reflect --local option.
Date: Thu, 03 May 2012 16:25:59 -0700 [thread overview]
Message-ID: <7vr4v0deyg.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1754870.q6d2rgDqBT@flobuntu> (Florian Achleitner's message of "Fri, 04 May 2012 00:44:21 +0200")
Florian Achleitner <florian.achleitner2.6.31@gmail.com> writes:
> Describe config file selection in git-config.
> While the usage message of git-config shows --local,
> the documentation page did not contain anything about that.
>
> Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
> ---
> This was pointed out in http://thread.gmane.org/gmane.comp.version-
> control.git/196326
Hrm, does the updated text explain the usefulness of the option clearly
enough?
Peff> Original motivation is here:
Peff> http://thread.gmane.org/gmane.comp.version-control.git/152524
> +The file-option can be one of '--system', '--global', '--local', or '--file'
> which specify where the values will be read from or written to.
> The default is to assume the config file of the current repository,
> +.git/config unless defined otherwise with GIT_DIR and GIT_CONFIG.
> +For read commands like '--get' the default is to search local, global, and
> +system config files (in this order) for the requested value and stop after
> +the first finding.
It may be just me, but I find the untouched "The default is to assume"
line somewhat out of place after this update. When reading, without any
of the options, we read all three places and consolidate them (stopping
after the first file that has the definition is a funny exception that
"--get" does; in general the internals read all of them so "--get-all"
output is a better way to understand what you wrote in your configuration
files), and when writing, without any of the options, we write to the
current configuration file.
The paragraph should first be restructured to describe read and write
cases separately, and then '--local' should be described, perhaps like
this?
When reading, the values are read from the system, global and
repository local configuration files by default, and options
'--system', '--global', '--local' and '--file <filename>' can be
used to tell the command to read from only that location.
When writing, the new value is written to the repository local
configuration file by default, and options '--system', '--global',
'--file <filename>' can be used to tell the command to write to
that location (you can say '--local' but that is the default).
next prev parent reply other threads:[~2012-05-03 23:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 22:44 [PATCH] Update Documentation/git-config to reflect --local option Florian Achleitner
2012-05-03 23:25 ` Junio C Hamano [this message]
2012-05-04 3:26 ` Jonathan Nieder
2012-05-05 10:03 ` [PATCH v2] " Florian Achleitner
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=7vr4v0deyg.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=davidbarr@google.com \
--cc=florian.achleitner.2.6.31@gmail.com \
--cc=florian.achleitner2.6.31@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.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).