Re: [PATCH] doc: clarify usage of XDG_CONFIG_HOME config file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jacob Keller <jacob.keller@xxxxxxxxx> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux