generate-cmdlist.sh: collect config from all config.txt files
This script uses Documentation/config.txt as input for "git help --config" and "git config" completion but it misses the fact that config.txt includes other txt files. Include all *config.txt as input when scanning for config keys. This could produce false positives, but as long as we stick to the blah-config.txt naming convention, we should be ok. While at there, move diff.* from config.txt to diff-config.txt where all other diff config keys are. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Aug 19, 2018 at 12:52 UTC
eb90ea79c59197e25a40fc3414a75d977f8a8f56
4 files changed
+14
-14
Documentation/config.txt
-12
@@ -1203,18 +1203,6 @@ This does not affect linkgit:git-format-patch[1] or the
1203
'git-diff-{asterisk}' plumbing commands. Can be overridden on the
1204
command line with the `--color[=<when>]` option.
1205
1206
-diff.colorMoved::
1207
- If set to either a valid `<mode>` or a true value, moved lines
1208
- in a diff are colored differently, for details of valid modes
1209
- see '--color-moved' in linkgit:git-diff[1]. If simply set to
1210
- true the default color mode will be used. When set to false,
1211
- moved lines are not colored.
1212
-
1213
-diff.colorMovedWS::
1214
- When moved lines are colored using e.g. the `diff.colorMoved` setting,
1215
- this option controls the `<mode>` how spaces are treated
1216
- for details of valid modes see '--color-moved-ws' in linkgit:git-diff[1].
1217
-
1206
color.diff.<slot>::
1207
Use customized color for diff colorization. `<slot>` specifies
1208
which part of the patch to use the specified color, and is one
Documentation/diff-config.txt
+12
@@ -208,3 +208,15 @@ diff.wsErrorHighlight::
208
whitespace errors are colored with `color.diff.whitespace`.
209
The command line option `--ws-error-highlight=<kind>`
210
overrides this setting.
211
+
212
+diff.colorMoved::
213
+ If set to either a valid `<mode>` or a true value, moved lines
214
+ in a diff are colored differently, for details of valid modes
215
+ see '--color-moved' in linkgit:git-diff[1]. If simply set to
216
+ true the default color mode will be used. When set to false,
217
+ moved lines are not colored.
218
+
219
+diff.colorMovedWS::
220
+ When moved lines are colored using e.g. the `diff.colorMoved` setting,
221
+ this option controls the `<mode>` how spaces are treated
222
+ for details of valid modes see '--color-moved-ws' in linkgit:git-diff[1].
Makefile
+1
-1
@@ -2047,7 +2047,7 @@ $(BUILT_INS): git$X
2047
2048
command-list.h: generate-cmdlist.sh command-list.txt
2049
2050
-command-list.h: $(wildcard Documentation/git*.txt) Documentation/config.txt
2050
+command-list.h: $(wildcard Documentation/git*.txt) Documentation/*config.txt
2051
$(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@
2052
2053
SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\
generate-cmdlist.sh
+1
-1
@@ -80,7 +80,7 @@ print_config_list () {
80
cat <<EOF
81
static const char *config_name_list[] = {
82
EOF
83
- grep '^[a-zA-Z].*\..*::$' Documentation/config.txt |
83
+ grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt |
84
sed '/deprecated/d; s/::$//; s/, */\n/g' |
85
sort |
86
while read line