[PATCH] generate-cmdlist.sh: collect config from all config.txt files

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

 



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@xxxxxxxxx>
---
 Documentation/config.txt      | 12 ------------
 Documentation/diff-config.txt | 12 ++++++++++++
 Makefile                      |  2 +-
 generate-cmdlist.sh           |  2 +-
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 95ad715a44..132bf08eaf 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1203,18 +1203,6 @@ This does not affect linkgit:git-format-patch[1] or the
 'git-diff-{asterisk}' plumbing commands.  Can be overridden on the
 command line with the `--color[=<when>]` option.
 
-diff.colorMoved::
-	If set to either a valid `<mode>` or a true value, moved lines
-	in a diff are colored differently, for details of valid modes
-	see '--color-moved' in linkgit:git-diff[1]. If simply set to
-	true the default color mode will be used. When set to false,
-	moved lines are not colored.
-
-diff.colorMovedWS::
-	When moved lines are colored using e.g. the `diff.colorMoved` setting,
-	this option controls the `<mode>` how spaces are treated
-	for details of valid modes see '--color-moved-ws' in linkgit:git-diff[1].
-
 color.diff.<slot>::
 	Use customized color for diff colorization.  `<slot>` specifies
 	which part of the patch to use the specified color, and is one
diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt
index 77caa66c2f..85bca83c30 100644
--- a/Documentation/diff-config.txt
+++ b/Documentation/diff-config.txt
@@ -208,3 +208,15 @@ diff.wsErrorHighlight::
 	whitespace errors are colored with `color.diff.whitespace`.
 	The command line option `--ws-error-highlight=<kind>`
 	overrides this setting.
+
+diff.colorMoved::
+	If set to either a valid `<mode>` or a true value, moved lines
+	in a diff are colored differently, for details of valid modes
+	see '--color-moved' in linkgit:git-diff[1]. If simply set to
+	true the default color mode will be used. When set to false,
+	moved lines are not colored.
+
+diff.colorMovedWS::
+	When moved lines are colored using e.g. the `diff.colorMoved` setting,
+	this option controls the `<mode>` how spaces are treated
+	for details of valid modes see '--color-moved-ws' in linkgit:git-diff[1].
diff --git a/Makefile b/Makefile
index 73aa943e28..4cb4ac2d5d 100644
--- a/Makefile
+++ b/Makefile
@@ -2044,7 +2044,7 @@ $(BUILT_INS): git$X
 
 command-list.h: generate-cmdlist.sh command-list.txt
 
-command-list.h: $(wildcard Documentation/git*.txt) Documentation/config.txt
+command-list.h: $(wildcard Documentation/git*.txt) Documentation/*config.txt
 	$(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@
 
 SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\
diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
index c4124acbe7..fa1e5475e8 100755
--- a/generate-cmdlist.sh
+++ b/generate-cmdlist.sh
@@ -80,7 +80,7 @@ print_config_list () {
 	cat <<EOF
 static const char *config_name_list[] = {
 EOF
-	grep '^[a-zA-Z].*\..*::$' Documentation/config.txt |
+	grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt |
 	sed '/deprecated/d; s/::$//; s/,  */\n/g' |
 	sort |
 	while read line
-- 
2.18.0.1004.g6639190530




[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