Re: [PATCH] Update Documentation/git-config to reflect --local option.

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

 



Florian Achleitner <florian.achleitner2.6.31@xxxxxxxxx> 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@xxxxxxxxx>
> ---
> 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).

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]