{"thread":{"id":"49160","subject":"[PATCH] generate-cmdlist.sh: collect config from all config.txt files","startedAt":"2018-08-19T10:52:17Z","lastAt":"2018-08-19T10:52:17Z","messageCount":1,"participants":["Nguyễn Thái Ngọc Duy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"356031","messageId":"20180819105210.19296-1-pclouds@gmail.com","threadId":"49160","inReplyTo":null,"subject":"[PATCH] generate-cmdlist.sh: collect config from all config.txt files","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-08-19T10:52:10Z","receivedAt":"2018-08-19T10:52:17Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"This script uses Documentation/config.txt as input for \"git help\n--config\" and \"git config\" completion but it misses the fact that\nconfig.txt includes other txt files. Include all *config.txt as input\nwhen scanning for config keys. This could produce false positives, but\nas long as we stick to the blah-config.txt naming convention, we\nshould be ok.\n\nWhile at there, move diff.* from config.txt to diff-config.txt where\nall other diff config keys are.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n Documentation/config.txt      | 12 ------------\n Documentation/diff-config.txt | 12 ++++++++++++\n Makefile                      |  2 +-\n generate-cmdlist.sh           |  2 +-\n 4 files changed, 14 insertions(+), 14 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 95ad715a44..132bf08eaf 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -1203,18 +1203,6 @@ This does not affect linkgit:git-format-patch[1] or the\n 'git-diff-{asterisk}' plumbing commands.  Can be overridden on the\n command line with the `--color[=<when>]` option.\n \n-diff.colorMoved::\n-\tIf set to either a valid `<mode>` or a true value, moved lines\n-\tin a diff are colored differently, for details of valid modes\n-\tsee '--color-moved' in linkgit:git-diff[1]. If simply set to\n-\ttrue the default color mode will be used. When set to false,\n-\tmoved lines are not colored.\n-\n-diff.colorMovedWS::\n-\tWhen moved lines are colored using e.g. the `diff.colorMoved` setting,\n-\tthis option controls the `<mode>` how spaces are treated\n-\tfor details of valid modes see '--color-moved-ws' in linkgit:git-diff[1].\n-\n color.diff.<slot>::\n \tUse customized color for diff colorization.  `<slot>` specifies\n \twhich part of the patch to use the specified color, and is one\ndiff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt\nindex 77caa66c2f..85bca83c30 100644\n--- a/Documentation/diff-config.txt\n+++ b/Documentation/diff-config.txt\n@@ -208,3 +208,15 @@ diff.wsErrorHighlight::\n \twhitespace errors are colored with `color.diff.whitespace`.\n \tThe command line option `--ws-error-highlight=<kind>`\n \toverrides this setting.\n+\n+diff.colorMoved::\n+\tIf set to either a valid `<mode>` or a true value, moved lines\n+\tin a diff are colored differently, for details of valid modes\n+\tsee '--color-moved' in linkgit:git-diff[1]. If simply set to\n+\ttrue the default color mode will be used. When set to false,\n+\tmoved lines are not colored.\n+\n+diff.colorMovedWS::\n+\tWhen moved lines are colored using e.g. the `diff.colorMoved` setting,\n+\tthis option controls the `<mode>` how spaces are treated\n+\tfor details of valid modes see '--color-moved-ws' in linkgit:git-diff[1].\ndiff --git a/Makefile b/Makefile\nindex 73aa943e28..4cb4ac2d5d 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2044,7 +2044,7 @@ $(BUILT_INS): git$X\n \n command-list.h: generate-cmdlist.sh command-list.txt\n \n-command-list.h: $(wildcard Documentation/git*.txt) Documentation/config.txt\n+command-list.h: $(wildcard Documentation/git*.txt) Documentation/*config.txt\n \t$(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@\n \n SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\\\ndiff --git a/generate-cmdlist.sh b/generate-cmdlist.sh\nindex c4124acbe7..fa1e5475e8 100755\n--- a/generate-cmdlist.sh\n+++ b/generate-cmdlist.sh\n@@ -80,7 +80,7 @@ print_config_list () {\n \tcat <<EOF\n static const char *config_name_list[] = {\n EOF\n-\tgrep '^[a-zA-Z].*\\..*::$' Documentation/config.txt |\n+\tgrep -h '^[a-zA-Z].*\\..*::$' Documentation/*config.txt |\n \tsed '/deprecated/d; s/::$//; s/,  */\\n/g' |\n \tsort |\n \twhile read line\n-- \n2.18.0.1004.g6639190530\n\n"}]}