Skip to content

Commit eb90ea7

Browse files
pcloudsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7e8bfb0 commit eb90ea7

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

Documentation/config.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,18 +1203,6 @@ This does not affect linkgit:git-format-patch[1] or the
12031203
'git-diff-{asterisk}' plumbing commands. Can be overridden on the
12041204
command line with the `--color[=<when>]` option.
12051205

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-
12181206
color.diff.<slot>::
12191207
Use customized color for diff colorization. `<slot>` specifies
12201208
which part of the patch to use the specified color, and is one

Documentation/diff-config.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,15 @@ diff.wsErrorHighlight::
208208
whitespace errors are colored with `color.diff.whitespace`.
209209
The command line option `--ws-error-highlight=<kind>`
210210
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ $(BUILT_INS): git$X
20472047

20482048
command-list.h: generate-cmdlist.sh command-list.txt
20492049

2050-
command-list.h: $(wildcard Documentation/git*.txt) Documentation/config.txt
2050+
command-list.h: $(wildcard Documentation/git*.txt) Documentation/*config.txt
20512051
$(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@
20522052

20532053
SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\

generate-cmdlist.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ print_config_list () {
8080
cat <<EOF
8181
static const char *config_name_list[] = {
8282
EOF
83-
grep '^[a-zA-Z].*\..*::$' Documentation/config.txt |
83+
grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt |
8484
sed '/deprecated/d; s/::$//; s/, */\n/g' |
8585
sort |
8686
while read line

0 commit comments

Comments
 (0)