git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: git@vger.kernel.org, Yaroslav Halchenko <yoh@onerussian.com>
Subject: Re: [PATCH] doc: clarify usage of XDG_CONFIG_HOME config file
Date: Tue, 12 Dec 2017 11:47:58 -0800	[thread overview]
Message-ID: <xmqqo9n320ep.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1513077862-165-1-git-send-email-jacob.keller@gmail.com> (Jacob Keller's message of "Tue, 12 Dec 2017 03:24:22 -0800")

Jacob Keller <jacob.keller@gmail.com> writes:

>  --global::
> +	For writing options: write to global user configuration file
> +	rather than the repository `.git/config`.
>  +
> +For reading options: read only from global user configuration file
> +rather than from all available files.
>  +
>  See also <<FILES>>.

OK.

> @@ -237,26 +235,30 @@ See also <<FILES>>.
>  FILES
>  -----
>  
> +If not set explicitly with `--file`, there are three locations where
>  'git config' will search for configuration options:
>  
> +System-wide configuration::
> +	Located at `$(prefix)/etc/gitconfig`.
>  
> +User-specific configuration::
> +	One and only one of the following files will be read

We said "will search for" upfront, but this talks about "will be
read", leaving the reader puzzled as to what should happen when
writing.  Perhaps "s/read/used/"?

> ++
> +- `~/.gitconfig`
> +- `$XDG_CONFIG_HOME/git/config`
> +- `$HOME/.config/git/config`
> ++
> +If `~/.gitconfig` exists, it will be used, and the other files will not be
> +read. Otherwise, if `$XDG_CONFIG_HOME` is set, then `$XDG_CONFIG_HOME/git/config`
> +will be used, otherwise `$HOME/.config/git/config` will be used.

And then "and the other files will not be read" can be dropped from
the first sentence of this paragraph?

Yaroslav on the original thread mentioned that reading codepath
without --file or --global does not limit to one of the three, and
this section is about "If not set explicitly with `--file`", so we'd
need to make sure if the above is what happens in reality (or update
the proposed clarification to match the reality).

Thanks.

  parent reply	other threads:[~2017-12-12 19:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 11:24 [PATCH] doc: clarify usage of XDG_CONFIG_HOME config file Jacob Keller
2017-12-12 15:20 ` Todd Zullinger
2017-12-13  5:36   ` Jacob Keller
2017-12-12 19:47 ` Junio C Hamano [this message]
2017-12-13  5:38   ` Jacob Keller
2017-12-13 14:23     ` Yaroslav Halchenko
2017-12-13 19:57       ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqo9n320ep.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jacob.keller@gmail.com \
    --cc=yoh@onerussian.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).