{"thread":{"id":"61249","subject":"[PATCH 3/3] t4047: whitespace in diff.dirstat and --dirstat","startedAt":"2024-04-02T00:13:51Z","lastAt":"2024-04-16T05:40:19Z","messageCount":6,"participants":["Dragan Simic"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"492007","messageId":"cover.1712016667.git.dsimic@manjaro.org","threadId":"61249","inReplyTo":null,"subject":"[PATCH 0/3] Make support for multi-value configuration options more consistent","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-04-02T00:13:41Z","receivedAt":"2024-04-02T00:13:51Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"This series adds support for optional placing of additional whitespace\ncharacters around the commas in the multi-value, comma-separated values\nfor the \"diff.dirstat\" and \"diff.wsErrorHighlight\" configuration options,\nand the \"--dirstat\" and \"--ws-error-highlight\" command-line options.\n\nThis makes the way multi-(sub)value configuration options can be specified\nmore consistent, because exactly the same additional whitespace characters\nare already allowed for some of the configuration options.  It may also\nmake the configuration files more readable to some users.\n\nDragan Simic (3):\n  diff: support additional whitespace in diff.{dirstat,wsErrorHighlight}\n  t4015: whitespace in diff.wsErrorHighlight and --ws-error-highlight\n  t4047: whitespace in diff.dirstat and --dirstat\n\n builtin/gc.c                |  4 ++--\n diff.c                      | 14 ++++++++++----\n notes.c                     |  2 +-\n refs/packed-backend.c       |  2 +-\n string-list.c               | 27 +++++++++++++++++++++------\n string-list.h               | 10 ++++++----\n t/helper/test-hashmap.c     |  2 +-\n t/helper/test-json-writer.c |  2 +-\n t/helper/test-oidmap.c      |  2 +-\n t/helper/test-string-list.c |  4 ++--\n t/t4015-diff-whitespace.sh  | 36 ++++++++++++++++++++++++++++++++++--\n t/t4047-diff-dirstat.sh     | 33 ++++++++++++++++++++++++++++++---\n 12 files changed, 110 insertions(+), 28 deletions(-)\n\n"},{"id":"492008","messageId":"cc9d9e561d7cf49eb9d43e8351f9dd9509792af0.1712016667.git.dsimic@manjaro.org","threadId":"61249","inReplyTo":"cover.1712016667.git.dsimic@manjaro.org","subject":"[PATCH 2/3] t4015: whitespace in diff.wsErrorHighlight and --ws-error-highlight","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-04-02T00:13:43Z","receivedAt":"2024-04-02T00:13:51Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"Add a few more tests to cover the support for optional placing of additional\nwhitespace characters around the commas in the multi-value, comma-separated\nvalues for the \"diff.wsErrorHighlight\" configuration option and the\n\"--ws-error-highlight\" command-line option.\n\nSigned-off-by: Dragan Simic <dsimic@manjaro.org>\n---\n t/t4015-diff-whitespace.sh | 36 ++++++++++++++++++++++++++++++++++--\n 1 file changed, 34 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh\nindex b443626afd72..22f4f3bba7f1 100755\n--- a/t/t4015-diff-whitespace.sh\n+++ b/t/t4015-diff-whitespace.sh\n@@ -1088,7 +1088,7 @@ test_expect_success 'ws-error-highlight test setup' '\n \n '\n \n-test_expect_success 'test --ws-error-highlight option' '\n+test_expect_success 'test --ws-error-highlight option with no spaces' '\n \n \tgit diff --color --ws-error-highlight=default,old >current.raw &&\n \ttest_decode_color <current.raw >current &&\n@@ -1104,7 +1104,23 @@ test_expect_success 'test --ws-error-highlight option' '\n \n '\n \n-test_expect_success 'test diff.wsErrorHighlight config' '\n+test_expect_success 'test --ws-error-highlight option with spaces' '\n+\n+\tgit diff --color --ws-error-highlight=\"default, old\" >current.raw &&\n+\ttest_decode_color <current.raw >current &&\n+\ttest_cmp expect.default-old current &&\n+\n+\tgit diff --color --ws-error-highlight=\"default , old\" >current.raw &&\n+\ttest_decode_color <current.raw >current &&\n+\ttest_cmp expect.default-old current &&\n+\n+\tgit diff --color --ws-error-highlight=\" default , old \" >current.raw &&\n+\ttest_decode_color <current.raw >current &&\n+\ttest_cmp expect.default-old current\n+\n+'\n+\n+test_expect_success 'test diff.wsErrorHighlight config with no spaces' '\n \n \tgit -c diff.wsErrorHighlight=default,old diff --color >current.raw &&\n \ttest_decode_color <current.raw >current &&\n@@ -1120,6 +1136,22 @@ test_expect_success 'test diff.wsErrorHighlight config' '\n \n '\n \n+test_expect_success 'test diff.wsErrorHighlight config with spaces' '\n+\n+\tgit -c \"diff.wsErrorHighlight=default, old\" diff --color >current.raw &&\n+\ttest_decode_color <current.raw >current &&\n+\ttest_cmp expect.default-old current &&\n+\n+\tgit -c \"diff.wsErrorHighlight=default , old\" diff --color >current.raw &&\n+\ttest_decode_color <current.raw >current &&\n+\ttest_cmp expect.default-old current &&\n+\n+\tgit -c \"diff.wsErrorHighlight= default , old \" diff --color >current.raw &&\n+\ttest_decode_color <current.raw >current &&\n+\ttest_cmp expect.default-old current\n+\n+'\n+\n test_expect_success 'option overrides diff.wsErrorHighlight' '\n \n \tgit -c diff.wsErrorHighlight=none \\\n"},{"id":"492009","messageId":"c26393897753e5899431ae527a594bb457eb73b8.1712016667.git.dsimic@manjaro.org","threadId":"61249","inReplyTo":"cover.1712016667.git.dsimic@manjaro.org","subject":"[PATCH 1/3] diff: support additional whitespace in diff.{dirstat,wsErrorHighlight}","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-04-02T00:13:42Z","receivedAt":"2024-04-02T00:13:51Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"Allow additional whitespace characters to be placed around the commas\nin the multi-(sub)value, comma-separated values for the \"diff.dirstat\" and\n\"diff.wsErrorHighlight\" configuration options.  This makes the way multi-value\nconfiguration options can be specified more consistent, because exactly the\nsame additional whitespace characters are already allowed for some of the\nconfiguration options, including \"core.whitespace\", \"log.graphColors\" and\n\"color.blame.highlightRecent\".\n\nBesides improving the consistency of the configuration syntax, being able\nto include additional whitespace characters into the values of a couple more\nof the comma-separated configuration values may also make the configuration\nfiles more readable to some users.\n\nThis optional support for the additional whitespace around the commas also\nextends to the equivalent comma-separated values for the \"--dirstat\" and\n\"--ws-error-highlight\" command-line options.\n\nSigned-off-by: Dragan Simic <dsimic@manjaro.org>\n---\n builtin/gc.c                |  4 ++--\n diff.c                      | 14 ++++++++++----\n notes.c                     |  2 +-\n refs/packed-backend.c       |  2 +-\n string-list.c               | 27 +++++++++++++++++++++------\n string-list.h               | 10 ++++++----\n t/helper/test-hashmap.c     |  2 +-\n t/helper/test-json-writer.c |  2 +-\n t/helper/test-oidmap.c      |  2 +-\n t/helper/test-string-list.c |  4 ++--\n 10 files changed, 46 insertions(+), 23 deletions(-)\n\ndiff --git a/builtin/gc.c b/builtin/gc.c\nindex cb80ced6cb5c..5c6a3b5f65c3 100644\n--- a/builtin/gc.c\n+++ b/builtin/gc.c\n@@ -1702,11 +1702,11 @@ static int get_schedule_cmd(const char **cmd, int *is_available)\n \tif (is_available)\n \t\t*is_available = 0;\n \n-\tstring_list_split_in_place(&list, testing, \",\", -1);\n+\tstring_list_split_in_place(&list, testing, \",\", \"\", -1);\n \tfor_each_string_list_item(item, &list) {\n \t\tstruct string_list pair = STRING_LIST_INIT_NODUP;\n \n-\t\tif (string_list_split_in_place(&pair, item->string, \":\", 2) != 2)\n+\t\tif (string_list_split_in_place(&pair, item->string, \":\", \"\", 2) != 2)\n \t\t\tcontinue;\n \n \t\tif (!strcmp(*cmd, pair.items[0].string)) {\ndiff --git a/diff.c b/diff.c\nindex 108c1875775d..bf3aa148aeed 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -141,7 +141,7 @@ static int parse_dirstat_params(struct diff_options *options, const char *params\n \tint i;\n \n \tif (*params_copy)\n-\t\tstring_list_split_in_place(&params, params_copy, \",\", -1);\n+\t\tstring_list_split_in_place(&params, params_copy, \",\", \" \\t\\n\\r\", -1);\n \tfor (i = 0; i < params.nr; i++) {\n \t\tconst char *p = params.items[i].string;\n \t\tif (!strcmp(p, \"changes\")) {\n@@ -232,10 +232,16 @@ long parse_algorithm_value(const char *value)\n \n static int parse_one_token(const char **arg, const char *token)\n {\n+\tconst char ignored[] = \" \\t\\n\\r\";\n \tconst char *rest;\n-\tif (skip_prefix(*arg, token, &rest) && (!*rest || *rest == ',')) {\n-\t\t*arg = rest;\n-\t\treturn 1;\n+\n+\t*arg += strspn(*arg, ignored);\n+\tif (skip_prefix(*arg, token, &rest)) {\n+\t\trest += strspn(rest, ignored);\n+\t\tif (!*rest || *rest == ',') {\n+\t\t\t*arg = rest;\n+\t\t\treturn 1;\n+\t\t}\n \t}\n \treturn 0;\n }\ndiff --git a/notes.c b/notes.c\nindex fed1eda80cd7..b6d4b7d7cd0f 100644\n--- a/notes.c\n+++ b/notes.c\n@@ -962,7 +962,7 @@ void string_list_add_refs_from_colon_sep(struct string_list *list,\n \tchar *globs_copy = xstrdup(globs);\n \tint i;\n \n-\tstring_list_split_in_place(&split, globs_copy, \":\", -1);\n+\tstring_list_split_in_place(&split, globs_copy, \":\", \"\", -1);\n \tstring_list_remove_empty_items(&split, 0);\n \n \tfor (i = 0; i < split.nr; i++)\ndiff --git a/refs/packed-backend.c b/refs/packed-backend.c\nindex 4e826c05ff2b..65ccbcf9475f 100644\n--- a/refs/packed-backend.c\n+++ b/refs/packed-backend.c\n@@ -676,7 +676,7 @@ static struct snapshot *create_snapshot(struct packed_ref_store *refs)\n \t\t\t\t\t snapshot->buf,\n \t\t\t\t\t snapshot->eof - snapshot->buf);\n \n-\t\tstring_list_split_in_place(&traits, p, \" \", -1);\n+\t\tstring_list_split_in_place(&traits, p, \" \", \"\", -1);\n \n \t\tif (unsorted_string_list_has_string(&traits, \"fully-peeled\"))\n \t\t\tsnapshot->peeled = PEELED_FULLY;\ndiff --git a/string-list.c b/string-list.c\nindex 954569f381d8..bdf731b3c209 100644\n--- a/string-list.c\n+++ b/string-list.c\n@@ -309,21 +309,36 @@ int string_list_split(struct string_list *list, const char *string,\n }\n \n int string_list_split_in_place(struct string_list *list, char *string,\n-\t\t\t       const char *delim, int maxsplit)\n+\t\t\t       const char *delim, const char *ignored,\n+\t\t\t       int maxsplit)\n {\n \tint count = 0;\n-\tchar *p = string, *end;\n+\tchar *p = string, *trim, *end;\n+\tsize_t length = strlen(string);\n \n \tif (list->strdup_strings)\n \t\tdie(\"internal error in string_list_split_in_place(): \"\n \t\t    \"list->strdup_strings must not be set\");\n+\n \tfor (;;) {\n \t\tcount++;\n-\t\tif (maxsplit >= 0 && count > maxsplit) {\n-\t\t\tstring_list_append(list, p);\n-\t\t\treturn count;\n+\t\tif (*ignored) {\n+\t\t\ttrim = p + strspn(p, ignored);\n+\t\t\twhile (p != trim)\n+\t\t\t\t*p++ = '\\0';\n+\t\t}\n+\t\tif (maxsplit >= 0 && count > maxsplit)\n+\t\t\tend = NULL;\n+\t\telse\n+\t\t\tend = strpbrk(p, delim);\n+\t\tif (*ignored) {\n+\t\t\tif (end)\n+\t\t\t\ttrim = end - 1;\n+\t\t\telse\n+\t\t\t\ttrim = string + length - 1;\n+\t\t\twhile (trim >= string && strchr(ignored, *trim))\n+\t\t\t\t*trim-- = '\\0';\n \t\t}\n-\t\tend = strpbrk(p, delim);\n \t\tif (end) {\n \t\t\t*end = '\\0';\n \t\t\tstring_list_append(list, p);\ndiff --git a/string-list.h b/string-list.h\nindex 122b31864198..1219f7f72778 100644\n--- a/string-list.h\n+++ b/string-list.h\n@@ -274,11 +274,13 @@ int string_list_split(struct string_list *list, const char *string,\n \n /*\n  * Like string_list_split(), except that string is split in-place: the\n- * delimiter characters in string are overwritten with NULs, and the\n- * new string_list_items point into string (which therefore must not\n- * be modified or freed while the string_list is in use).\n+ * delimiter characters in string and the optionally ignored characters\n+ * that surround the substrings after splitting are overwritten with NULs,\n+ * and the new string_list_items point into string (which therefore must\n+ * not be modified or freed while the string_list is in use).\n  * list->strdup_strings must *not* be set.\n  */\n int string_list_split_in_place(struct string_list *list, char *string,\n-\t\t\t       const char *delim, int maxsplit);\n+\t\t\t       const char *delim, const char *ignored,\n+\t\t\t       int maxsplit);\n #endif /* STRING_LIST_H */\ndiff --git a/t/helper/test-hashmap.c b/t/helper/test-hashmap.c\nindex 0eb0b3d49cec..7cc62bcc1b78 100644\n--- a/t/helper/test-hashmap.c\n+++ b/t/helper/test-hashmap.c\n@@ -167,7 +167,7 @@ int cmd__hashmap(int argc, const char **argv)\n \n \t\t/* break line into command and up to two parameters */\n \t\tstring_list_setlen(&parts, 0);\n-\t\tstring_list_split_in_place(&parts, line.buf, DELIM, 2);\n+\t\tstring_list_split_in_place(&parts, line.buf, DELIM, \"\", 2);\n \t\tstring_list_remove_empty_items(&parts, 0);\n \n \t\t/* ignore empty lines */\ndiff --git a/t/helper/test-json-writer.c b/t/helper/test-json-writer.c\nindex afe393f59741..6a54bac1e971 100644\n--- a/t/helper/test-json-writer.c\n+++ b/t/helper/test-json-writer.c\n@@ -490,7 +490,7 @@ static int scripted(void)\n \n \t\t/* break line into command and zero or more tokens */\n \t\tstring_list_setlen(&parts, 0);\n-\t\tstring_list_split_in_place(&parts, line, \" \", -1);\n+\t\tstring_list_split_in_place(&parts, line, \" \", \"\", -1);\n \t\tstring_list_remove_empty_items(&parts, 0);\n \n \t\t/* ignore empty lines */\ndiff --git a/t/helper/test-oidmap.c b/t/helper/test-oidmap.c\nindex bd30244a54cc..0861afedb11e 100644\n--- a/t/helper/test-oidmap.c\n+++ b/t/helper/test-oidmap.c\n@@ -44,7 +44,7 @@ int cmd__oidmap(int argc UNUSED, const char **argv UNUSED)\n \n \t\t/* break line into command and up to two parameters */\n \t\tstring_list_setlen(&parts, 0);\n-\t\tstring_list_split_in_place(&parts, line.buf, DELIM, 2);\n+\t\tstring_list_split_in_place(&parts, line.buf, DELIM, \"\", 2);\n \t\tstring_list_remove_empty_items(&parts, 0);\n \n \t\t/* ignore empty lines */\ndiff --git a/t/helper/test-string-list.c b/t/helper/test-string-list.c\nindex e2aad611d1c8..116469c2621b 100644\n--- a/t/helper/test-string-list.c\n+++ b/t/helper/test-string-list.c\n@@ -65,7 +65,7 @@ int cmd__string_list(int argc, const char **argv)\n \t\tconst char *delim = argv[3];\n \t\tint maxsplit = atoi(argv[4]);\n \n-\t\ti = string_list_split_in_place(&list, s, delim, maxsplit);\n+\t\ti = string_list_split_in_place(&list, s, delim, \"\", maxsplit);\n \t\tprintf(\"%d\\n\", i);\n \t\twrite_list(&list);\n \t\tstring_list_clear(&list, 0);\n@@ -111,7 +111,7 @@ int cmd__string_list(int argc, const char **argv)\n \t\t */\n \t\tif (sb.len && sb.buf[sb.len - 1] == '\\n')\n \t\t\tstrbuf_setlen(&sb, sb.len - 1);\n-\t\tstring_list_split_in_place(&list, sb.buf, \"\\n\", -1);\n+\t\tstring_list_split_in_place(&list, sb.buf, \"\\n\", \"\", -1);\n \n \t\tstring_list_sort(&list);\n \n"},{"id":"492006","messageId":"09d6260ffb717dd85ce6f041402ed9a5e1cfe039.1712016667.git.dsimic@manjaro.org","threadId":"61249","inReplyTo":"cover.1712016667.git.dsimic@manjaro.org","subject":"[PATCH 3/3] t4047: whitespace in diff.dirstat and --dirstat","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-04-02T00:13:44Z","receivedAt":"2024-04-02T00:13:52Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"Add a few more tests to cover the support for optional placing of additional\nwhitespace characters around the commas in the multi-value, comma-separated\nvalues for the \"diff.dirstat\" configuration option and the \"--dirstat\"\ncommand-line option.\n\nSigned-off-by: Dragan Simic <dsimic@manjaro.org>\n---\n t/t4047-diff-dirstat.sh | 33 ++++++++++++++++++++++++++++++---\n 1 file changed, 30 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t4047-diff-dirstat.sh b/t/t4047-diff-dirstat.sh\nindex 7b73462d53d2..715b3579539e 100755\n--- a/t/t4047-diff-dirstat.sh\n+++ b/t/t4047-diff-dirstat.sh\n@@ -707,24 +707,42 @@ test_expect_success '--dirstat-by-file --cumulative' '\n \ttest_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC\n '\n \n-test_expect_success '--dirstat=files,cumulative' '\n+test_expect_success '--dirstat=files,cumulative with no spaces' '\n \tgit diff --dirstat=files,cumulative HEAD^..HEAD >actual_diff_dirstat &&\n \ttest_cmp expect_diff_dirstat actual_diff_dirstat &&\n \tgit diff --dirstat=files,cumulative -M HEAD^..HEAD >actual_diff_dirstat_M &&\n \ttest_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&\n \tgit diff --dirstat=files,cumulative -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&\n \ttest_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC\n '\n \n-test_expect_success 'diff.dirstat=cumulative,files' '\n+test_expect_success '--dirstat=files,cumulative with spaces' '\n+\tgit diff --dirstat=\"files, cumulative\" HEAD^..HEAD >actual_diff_dirstat &&\n+\ttest_cmp expect_diff_dirstat actual_diff_dirstat &&\n+\tgit diff --dirstat=\"files , cumulative\" -M HEAD^..HEAD >actual_diff_dirstat_M &&\n+\ttest_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&\n+\tgit diff --dirstat=\" files , cumulative \" -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&\n+\ttest_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC\n+'\n+\n+test_expect_success 'diff.dirstat=cumulative,files with no spaces' '\n \tgit -c diff.dirstat=cumulative,files diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&\n \ttest_cmp expect_diff_dirstat actual_diff_dirstat &&\n \tgit -c diff.dirstat=cumulative,files diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&\n \ttest_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&\n \tgit -c diff.dirstat=cumulative,files diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&\n \ttest_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC\n '\n \n+test_expect_success 'diff.dirstat=cumulative,files with spaces' '\n+\tgit -c \"diff.dirstat= cumulative,files \" diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&\n+\ttest_cmp expect_diff_dirstat actual_diff_dirstat &&\n+\tgit -c \"diff.dirstat= cumulative ,files\" diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&\n+\ttest_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&\n+\tgit -c \"diff.dirstat= cumulative , files\" diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&\n+\ttest_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC\n+'\n+\n cat <<EOF >expect_diff_dirstat\n   27.2% dst/copy/\n   27.2% dst/move/\n@@ -766,15 +784,24 @@ test_expect_success '--dirstat=files,cumulative,10' '\n \ttest_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC\n '\n \n-test_expect_success 'diff.dirstat=10,cumulative,files' '\n+test_expect_success 'diff.dirstat=10,cumulative,files with no spaces' '\n \tgit -c diff.dirstat=10,cumulative,files diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&\n \ttest_cmp expect_diff_dirstat actual_diff_dirstat &&\n \tgit -c diff.dirstat=10,cumulative,files diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&\n \ttest_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&\n \tgit -c diff.dirstat=10,cumulative,files diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&\n \ttest_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC\n '\n \n+test_expect_success 'diff.dirstat=10,cumulative,files with spaces' '\n+\tgit -c \"diff.dirstat= 10,cumulative,files \" diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&\n+\ttest_cmp expect_diff_dirstat actual_diff_dirstat &&\n+\tgit -c \"diff.dirstat=10, cumulative, files\" diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&\n+\ttest_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&\n+\tgit -c \"diff.dirstat=10 , cumulative , files\" diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&\n+\ttest_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC\n+'\n+\n cat <<EOF >expect_diff_dirstat\n   27.2% dst/copy/\n   27.2% dst/move/\n"},{"id":"492013","messageId":"833011f0a807b6176de6fd8a8389b1bf@manjaro.org","threadId":"61249","inReplyTo":"cover.1712016667.git.dsimic@manjaro.org","subject":"Re: [PATCH 0/3] Make support for multi-value configuration options more consistent","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-04-02T00:31:10Z","receivedAt":"2024-04-02T00:31:12Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"On 2024-04-02 02:13, Dragan Simic wrote:\n> This series adds support for optional placing of additional whitespace\n> characters around the commas in the multi-value, comma-separated values\n> for the \"diff.dirstat\" and \"diff.wsErrorHighlight\" configuration \n> options,\n> and the \"--dirstat\" and \"--ws-error-highlight\" command-line options.\n> \n> This makes the way multi-(sub)value configuration options can be \n> specified\n> more consistent, because exactly the same additional whitespace \n> characters\n> are already allowed for some of the configuration options.  It may also\n> make the configuration files more readable to some users.\n\nMeh, somehow I managed to forget to include the brief summary for the\n\"what's cooking\".  Here's what might be used for that purpose:\n\n  * Allow additional whitespace around the commas in \n\"diff.dirstat=<multi-value>\",\n    \"diff.wsErrorHighlight=<multi-value>\", \"git diff \n--dirstat=<multi-value>\"\n    and \"git diff --ws-error-highlight=<multi-value>\".\n\n> Dragan Simic (3):\n>   diff: support additional whitespace in \n> diff.{dirstat,wsErrorHighlight}\n>   t4015: whitespace in diff.wsErrorHighlight and --ws-error-highlight\n>   t4047: whitespace in diff.dirstat and --dirstat\n> \n>  builtin/gc.c                |  4 ++--\n>  diff.c                      | 14 ++++++++++----\n>  notes.c                     |  2 +-\n>  refs/packed-backend.c       |  2 +-\n>  string-list.c               | 27 +++++++++++++++++++++------\n>  string-list.h               | 10 ++++++----\n>  t/helper/test-hashmap.c     |  2 +-\n>  t/helper/test-json-writer.c |  2 +-\n>  t/helper/test-oidmap.c      |  2 +-\n>  t/helper/test-string-list.c |  4 ++--\n>  t/t4015-diff-whitespace.sh  | 36 ++++++++++++++++++++++++++++++++++--\n>  t/t4047-diff-dirstat.sh     | 33 ++++++++++++++++++++++++++++++---\n>  12 files changed, 110 insertions(+), 28 deletions(-)\n"},{"id":"492983","messageId":"cd4a48d415af215fde2d7e593d28c055@manjaro.org","threadId":"61249","inReplyTo":"cover.1712016667.git.dsimic@manjaro.org","subject":"Re: [PATCH 0/3] Make support for multi-value configuration options more consistent","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-04-16T05:40:17Z","receivedAt":"2024-04-16T05:40:19Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"Hello all,\n\nOn 2024-04-02 02:13, Dragan Simic wrote:\n> This series adds support for optional placing of additional whitespace\n> characters around the commas in the multi-value, comma-separated values\n> for the \"diff.dirstat\" and \"diff.wsErrorHighlight\" configuration \n> options,\n> and the \"--dirstat\" and \"--ws-error-highlight\" command-line options.\n> \n> This makes the way multi-(sub)value configuration options can be \n> specified\n> more consistent, because exactly the same additional whitespace \n> characters\n> are already allowed for some of the configuration options.  It may also\n> make the configuration files more readable to some users.\n\nJust a brief reminder about this patch series.\n\n> Dragan Simic (3):\n>   diff: support additional whitespace in \n> diff.{dirstat,wsErrorHighlight}\n>   t4015: whitespace in diff.wsErrorHighlight and --ws-error-highlight\n>   t4047: whitespace in diff.dirstat and --dirstat\n> \n>  builtin/gc.c                |  4 ++--\n>  diff.c                      | 14 ++++++++++----\n>  notes.c                     |  2 +-\n>  refs/packed-backend.c       |  2 +-\n>  string-list.c               | 27 +++++++++++++++++++++------\n>  string-list.h               | 10 ++++++----\n>  t/helper/test-hashmap.c     |  2 +-\n>  t/helper/test-json-writer.c |  2 +-\n>  t/helper/test-oidmap.c      |  2 +-\n>  t/helper/test-string-list.c |  4 ++--\n>  t/t4015-diff-whitespace.sh  | 36 ++++++++++++++++++++++++++++++++++--\n>  t/t4047-diff-dirstat.sh     | 33 ++++++++++++++++++++++++++++++---\n>  12 files changed, 110 insertions(+), 28 deletions(-)\n"}]}