@@ -21,9 +21,63 @@ This edition covers what happened during the month of February 2016.
2121### General
2222-->
2323
24- <!-- -
2524### Reviews
26- -->
25+
26+ * [ config: add '--show-origin' option to print the origin of a config value] ( http://thread.gmane.org/gmane.comp.version-control.git/286198/ )
27+
28+ For some time Lars Schneider has been sending versions of a short
29+ patch series to make it possible to see where a config option comes
30+ from:
31+
32+ - [ v1] ( http://thread.gmane.org/gmane.comp.version-control.git/285553/ )
33+ - [ v2] ( http://thread.gmane.org/gmane.comp.version-control.git/285894/ )
34+ - [ v3] ( http://thread.gmane.org/gmane.comp.version-control.git/286110/ )
35+ - [ v4] ( http://thread.gmane.org/gmane.comp.version-control.git/286197/ )
36+ - [ v5] ( http://thread.gmane.org/gmane.comp.version-control.git/286485/ )
37+ - [ v6] ( http://thread.gmane.org/gmane.comp.version-control.git/286672/ )
38+
39+ Version 1 was itself based on a previous patch by Jeff King.
40+
41+ The new feature could be useful because config options can be set in
42+ many ways. The usual way is to use one of the config files:
43+
44+ - the ".git/config" file at the root of the working directory,
45+ - the user's "~ /.gitconfig" file,
46+ - the user's "~ /.config/git/config" file, or
47+ - a system wide "/etc/gitconfig" file.
48+
49+ But the exact paths of the above files depend on how git was compiled
50+ and on the values of at least the GIT_CONFIG, GIT_CONFIG_NOSYSTEM,
51+ GIT_DIR and XDG_CONFIG_HOME environment variables.
52+
53+ Also config values can also be set on the command line using the 'git
54+ -c' option, like ` git -c <key>=<value> config ... ` . Or they can be
55+ read from another file using the 'config -f' option, like `git config
56+ -f <file > ...`, or from the standard input. They can also be included
57+ from another file by using a "include.path = <path >" directive in a
58+ config file.
59+
60+ As can be seen in the above threads, even if it seems simple, there
61+ are a lot of details to get right. These details include the name of
62+ the option. This was discussed by Sebastian Schuberth, Jeff King,
63+ Ramsay Jones, Mike Rappazzo and Junio Hamano. So the name was changed
64+ to '--show-origin'.
65+
66+ Other details that were discussed are about the format of the output
67+ in special cases, like when the 'git -c' option is used, or when the
68+ 'config -f' option is used, or when config is read from the standard
69+ input.
70+
71+ The ` git config ` option also has a lot of different modes depending on
72+ which options it is passed, so it was discussed with which other
73+ options it is ok to pass '--show-origin'.
74+
75+ Many details in the code and tests where also discussed by Eric
76+ Sunshine, Johannes Schindelin, Johannes Sixt, Jeff, Ramsay and Junio.
77+
78+ One nice outcome of this patch series though is that error messages
79+ when there are problems in the config can now tell more precisely
80+ where the problems come from.
2781
2882<!-- -
2983### Support
0 commit comments