{"thread":{"id":"63565","subject":"[PATCH] completion: Make sed command that generates config-list.h portable.","startedAt":"2025-06-02T18:42:08Z","lastAt":"2025-06-03T23:57:12Z","messageCount":20,"participants":["Collin Funk","Brad Smith","Jean-Noël AVILA","Jacob Keller","Keller, Jacob E","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"519491","messageId":"0ab924839df48d869682bea1b0cb400f378ca6dc.1748889654.git.collin.funk1@gmail.com","threadId":"63565","inReplyTo":null,"subject":"[PATCH] completion: Make sed command that generates config-list.h portable.","fromName":"Collin Funk","fromEmail":"collin.funk1@gmail.com","sentAt":"2025-06-02T18:41:48Z","receivedAt":"2025-06-02T18:42:08Z","isPatch":true,"sender":{"key":"collin.funk1@gmail.com","avatar":"https://avatars.githubusercontent.com/u/65689063?v=4"},"body":"The OpenBSD 'sed' command does not support '\\n' to represent newlines in\nsed expressions. This leads to the follow compiler error:\n\n    In file included from builtin/help.c:15:\n    ./config-list.h:282:18: error: use of undeclared identifier 'n'\n            \"gitcvs.dbUser\",n       \"gitcvs.dbPass\",\n                            ^\n    1 error generated.\n    gmake: *** [Makefile:2821: builtin/help.o] Error 1\n\nWe can use a variable that expands to a newline to do this portably.\n\nThis portably issue was introduced in e1b81f54da (completion: take into\naccount the formatting backticks for options, 2025-03-19)\n\nSigned-off-by: Collin Funk <collin.funk1@gmail.com>\n---\n generate-configlist.sh | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/generate-configlist.sh b/generate-configlist.sh\nindex b06da53c89..48ec8d9812 100755\n--- a/generate-configlist.sh\n+++ b/generate-configlist.sh\n@@ -1,5 +1,8 @@\n #!/bin/sh\n \n+nl='\n+'\n+\n SOURCE_DIR=\"$1\"\n OUTPUT=\"$2\"\n \n@@ -19,7 +22,7 @@ EOF\n \ts/::$//;\n \ts/`//g;\n \ts/^.*$/\t\"&\",/;\n-\ts/,  */\",\\n\t\"/g;\n+\ts/,  */\",''\"$nl\"''\t\"/g;\n \tp;};\n d' \\\n \t    \"$SOURCE_DIR\"/Documentation/*config.adoc \\\n-- \n2.49.0\n\n"},{"id":"519496","messageId":"20913188-e706-45f2-82b8-9bf735b4f193@comstyle.com","threadId":"63565","inReplyTo":"0ab924839df48d869682bea1b0cb400f378ca6dc.1748889654.git.collin.funk1@gmail.com","subject":"Re: [PATCH] completion: Make sed command that generates config-list.h portable.","fromName":"Brad Smith","fromEmail":"brad@comstyle.com","sentAt":"2025-06-02T19:05:11Z","receivedAt":"2025-06-02T19:05:14Z","isPatch":true,"sender":{"key":"brad@comstyle.com","avatar":"https://avatars.githubusercontent.com/u/1129902?v=4"},"body":"On 2025-06-02 2:41 p.m., Collin Funk wrote:\n> The OpenBSD 'sed' command does not support '\\n' to represent newlines in\n> sed expressions. This leads to the follow compiler error:\n>\n>      In file included from builtin/help.c:15:\n>      ./config-list.h:282:18: error: use of undeclared identifier 'n'\n>              \"gitcvs.dbUser\",n       \"gitcvs.dbPass\",\n>                              ^\n>      1 error generated.\n>      gmake: *** [Makefile:2821: builtin/help.o] Error 1\n>\n> We can use a variable that expands to a newline to do this portably.\n>\n> This portably issue was introduced in e1b81f54da (completion: take into\n> account the formatting backticks for options, 2025-03-19)\n>\n> Signed-off-by: Collin Funk <collin.funk1@gmail.com>\n> ---\n>   generate-configlist.sh | 5 ++++-\n>   1 file changed, 4 insertions(+), 1 deletion(-)\n>\n> diff --git a/generate-configlist.sh b/generate-configlist.sh\n> index b06da53c89..48ec8d9812 100755\n> --- a/generate-configlist.sh\n> +++ b/generate-configlist.sh\n> @@ -1,5 +1,8 @@\n>   #!/bin/sh\n>   \n> +nl='\n> +'\n> +\n>   SOURCE_DIR=\"$1\"\n>   OUTPUT=\"$2\"\n>   \n> @@ -19,7 +22,7 @@ EOF\n>   \ts/::$//;\n>   \ts/`//g;\n>   \ts/^.*$/\t\"&\",/;\n> -\ts/,  */\",\\n\t\"/g;\n> +\ts/,  */\",''\"$nl\"''\t\"/g;\n>   \tp;};\n>   d' \\\n>   \t    \"$SOURCE_DIR\"/Documentation/*config.adoc \\\n\n\nThanks. This was the last piece I was just going to look into, but you\nhave provided a solution.\n\n"},{"id":"519497","messageId":"4986157.GXAFRqVoOG@cayenne","threadId":"63565","inReplyTo":"0ab924839df48d869682bea1b0cb400f378ca6dc.1748889654.git.collin.funk1@gmail.com","subject":"Re: [PATCH] completion: Make sed command that generates config-list.h portable.","fromName":"Jean-Noël AVILA","fromEmail":"jn.avila@free.fr","sentAt":"2025-06-02T19:05:56Z","receivedAt":"2025-06-02T19:07:01Z","isPatch":true,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"On Monday, 2 June 2025 20:41:48 CEST Collin Funk wrote:\n> The OpenBSD 'sed' command does not support '\\n' to represent newlines in\n> sed expressions. This leads to the follow compiler error:\n> \n>     In file included from builtin/help.c:15:\n>     ./config-list.h:282:18: error: use of undeclared identifier 'n'\n>             \"gitcvs.dbUser\",n       \"gitcvs.dbPass\",\n>                             ^\n>     1 error generated.\n>     gmake: *** [Makefile:2821: builtin/help.o] Error 1\n> \n> We can use a variable that expands to a newline to do this portably.\n> \n> This portably issue was introduced in e1b81f54da (completion: take into\n> account the formatting backticks for options, 2025-03-19)\n> \n> Signed-off-by: Collin Funk <collin.funk1@gmail.com>\n> ---\n>  generate-configlist.sh | 5 ++++-\n>  1 file changed, 4 insertions(+), 1 deletion(-)\n> \n> diff --git a/generate-configlist.sh b/generate-configlist.sh\n> index b06da53c89..48ec8d9812 100755\n> --- a/generate-configlist.sh\n> +++ b/generate-configlist.sh\n> @@ -1,5 +1,8 @@\n>  #!/bin/sh\n> \n> +nl='\n> +'\n> +\n>  SOURCE_DIR=\"$1\"\n>  OUTPUT=\"$2\"\n> \n> @@ -19,7 +22,7 @@ EOF\n>  \ts/::$//;\n>  \ts/`//g;\n>  \ts/^.*$/\t\"&\",/;\n> -\ts/,  */\",\\n\t\"/g;\n> +\ts/,  */\",''\"$nl\"''\t\"/g;\n>  \tp;};\n>  d' \\\n>  \t    \"$SOURCE_DIR\"/Documentation/*config.adoc \\\n\nHello,\n\nI was on this issue here: \nhttps://github.com/git/git/commit/e1b81f54da80267edee2cb8fd0d0f75f03023019\n\nYour proposed fix is interesting in that it does not spawn an additional \nprocess, but it does not work for me (debian sh = dash).\n\nᐅ diff config-list.h config-list.h.new\n281d280\n<       \"gitcvs.dbPass\",\n283c282\n<       \"gitcvs.dbUser\",\n---\n>       \"gitcvs.dbUser\",\"$nl\"   \"gitcvs.dbPass\",\n350,351c349\n<       \"http.lowSpeedLimit\",\n<       \"http.lowSpeedTime\",\n---\n>       \"http.lowSpeedLimit\",\"$nl\"      \"http.lowSpeedTime\",\n\nIf you'd like to test your patch on different systems and happen to have a \ngithub account, you can open a PR to gitgitgadget/git . This will trigger \nbuilds on several targets.\n\nThanks,\n\nJN\n\n\n"},{"id":"519499","messageId":"87iklet0fn.fsf@gmail.com","threadId":"63565","inReplyTo":"4986157.GXAFRqVoOG@cayenne","subject":"Re: [PATCH] completion: Make sed command that generates config-list.h portable.","fromName":"Collin Funk","fromEmail":"collin.funk1@gmail.com","sentAt":"2025-06-02T19:20:44Z","receivedAt":"2025-06-02T19:20:46Z","isPatch":true,"sender":{"key":"collin.funk1@gmail.com","avatar":"https://avatars.githubusercontent.com/u/65689063?v=4"},"body":"Jean-Noël AVILA <jn.avila@free.fr> writes:\n\n> Hello,\n>\n> I was on this issue here: \n> https://github.com/git/git/commit/e1b81f54da80267edee2cb8fd0d0f75f03023019\n>\n> Your proposed fix is interesting in that it does not spawn an additional \n> process, but it does not work for me (debian sh = dash).\n>\n> ᐅ diff config-list.h config-list.h.new\n> 281d280\n> <       \"gitcvs.dbPass\",\n> 283c282\n> <       \"gitcvs.dbUser\",\n> ---\n>>       \"gitcvs.dbUser\",\"$nl\"   \"gitcvs.dbPass\",\n> 350,351c349\n> <       \"http.lowSpeedLimit\",\n> <       \"http.lowSpeedTime\",\n> ---\n>>       \"http.lowSpeedLimit\",\"$nl\"      \"http.lowSpeedTime\",\n>\n> If you'd like to test your patch on different systems and happen to have a \n> github account, you can open a PR to gitgitgadget/git . This will trigger \n> builds on several targets.\n\nThank you very much for checking! On my system /bin/sh is linked to\n/bin/bash, so I did not notice.\n\nI will send a V2 that works with the dash packaged by Fedora 42. It\nproduces the same output as bash and works on OpenBSD.\n\nCollin\n"},{"id":"519500","messageId":"1ff542bb1090cc5185644d6032addac5cd0df402.1748892261.git.collin.funk1@gmail.com","threadId":"63565","inReplyTo":"0ab924839df48d869682bea1b0cb400f378ca6dc.1748889654.git.collin.funk1@gmail.com","subject":"[PATCH v2] completion: Make sed command that generates config-list.h portable.","fromName":"Collin Funk","fromEmail":"collin.funk1@gmail.com","sentAt":"2025-06-02T19:26:47Z","receivedAt":"2025-06-02T19:27:24Z","isPatch":true,"sender":{"key":"collin.funk1@gmail.com","avatar":"https://avatars.githubusercontent.com/u/65689063?v=4"},"body":"The OpenBSD 'sed' command does not support '\\n' to represent newlines in\nsed expressions. This leads to the follow compiler error:\n\n    In file included from builtin/help.c:15:\n    ./config-list.h:282:18: error: use of undeclared identifier 'n'\n            \"gitcvs.dbUser\",n       \"gitcvs.dbPass\",\n                            ^\n    1 error generated.\n    gmake: *** [Makefile:2821: builtin/help.o] Error 1\n\nWe can use a backslash followed by a newline to fix this.\n\nThis portably issue was introduced in e1b81f54da (completion: take into\naccount the formatting backticks for options, 2025-03-19)\n\nSigned-off-by: Collin Funk <collin.funk1@gmail.com>\n---\n generate-configlist.sh | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/generate-configlist.sh b/generate-configlist.sh\nindex b06da53c89..e1f9e99488 100755\n--- a/generate-configlist.sh\n+++ b/generate-configlist.sh\n@@ -19,7 +19,8 @@ EOF\n \ts/::$//;\n \ts/`//g;\n \ts/^.*$/\t\"&\",/;\n-\ts/,  */\",\\n\t\"/g;\n+\ts/,  */\",\\\n+\t\"/g;\n \tp;};\n d' \\\n \t    \"$SOURCE_DIR\"/Documentation/*config.adoc \\\n-- \n2.49.0\n\n"},{"id":"519503","messageId":"3631972.iIbC2pHGDl@cayenne","threadId":"63565","inReplyTo":"1ff542bb1090cc5185644d6032addac5cd0df402.1748892261.git.collin.funk1@gmail.com","subject":"Re: [PATCH v2] completion: Make sed command that generates config-list.h portable.","fromName":"Jean-Noël AVILA","fromEmail":"jn.avila@free.fr","sentAt":"2025-06-02T19:49:28Z","receivedAt":"2025-06-02T19:49:40Z","isPatch":true,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"On Monday, 2 June 2025 21:26:47 CEST Collin Funk wrote:\n> The OpenBSD 'sed' command does not support '\\n' to represent newlines in\n> sed expressions. This leads to the follow compiler error:\n> \n>     In file included from builtin/help.c:15:\n>     ./config-list.h:282:18: error: use of undeclared identifier 'n'\n>             \"gitcvs.dbUser\",n       \"gitcvs.dbPass\",\n>                             ^\n>     1 error generated.\n>     gmake: *** [Makefile:2821: builtin/help.o] Error 1\n> \n> We can use a backslash followed by a newline to fix this.\n> \n> This portably issue was introduced in e1b81f54da (completion: take into\n> account the formatting backticks for options, 2025-03-19)\n> \n> Signed-off-by: Collin Funk <collin.funk1@gmail.com>\n> ---\n>  generate-configlist.sh | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/generate-configlist.sh b/generate-configlist.sh\n> index b06da53c89..e1f9e99488 100755\n> --- a/generate-configlist.sh\n> +++ b/generate-configlist.sh\n> @@ -19,7 +19,8 @@ EOF\n>  \ts/::$//;\n>  \ts/`//g;\n>  \ts/^.*$/\t\"&\",/;\n> -\ts/,  */\",\\n\t\"/g;\n> +\ts/,  */\",\\\n> +\t\"/g;\n>  \tp;};\n>  d' \\\n>  \t    \"$SOURCE_DIR\"/Documentation/*config.adoc \\\n\nFYI I pushed your patch to \nhttps://github.com/gitgitgadget/git/pull/1930/\n\nIt seems to be passing, although it's not very readable.\n\nYour commit message has some issues:\n\n * upper case in \"Make\": prefixed commits message must be lower case\n * to be correct, the bug was already there at the first introduction of the \ngenerate-configlist.sh script (3ac68a9). The '\\n' was there, and the generated \n.h file had two wrong strings such as\n\"gitcvs.dbUserngitcvs.dbPass\" . My patch only put it in light by breaking the \nbuild.\n\nMaybe an alternative way of fixing the issue is to just rework the \ndocumentation on the two spots where a comma is used and put each config \nvariable on its own line.\n\nWhat do you think?\n\nJN\n\n\n\n"},{"id":"519504","messageId":"875xhducs7.fsf@gmail.com","threadId":"63565","inReplyTo":"3631972.iIbC2pHGDl@cayenne","subject":"Re: [PATCH v2] completion: Make sed command that generates config-list.h portable.","fromName":"Collin Funk","fromEmail":"collin.funk1@gmail.com","sentAt":"2025-06-02T20:08:40Z","receivedAt":"2025-06-02T20:08:42Z","isPatch":true,"sender":{"key":"collin.funk1@gmail.com","avatar":"https://avatars.githubusercontent.com/u/65689063?v=4"},"body":"Jean-Noël AVILA <jn.avila@free.fr> writes:\n\n> Your commit message has some issues:\n>\n>  * upper case in \"Make\": prefixed commits message must be lower case\n>  * to be correct, the bug was already there at the first introduction of the \n> generate-configlist.sh script (3ac68a9). The '\\n' was there, and the generated \n> .h file had two wrong strings such as\n> \"gitcvs.dbUserngitcvs.dbPass\" . My patch only put it in light by breaking the \n> build.\n\nThanks, I will keep that in mind for V3.\n\n> Maybe an alternative way of fixing the issue is to just rework the \n> documentation on the two spots where a comma is used and put each config \n> variable on its own line.\n>\n> What do you think?\n\nRegarding readability, it is not any worse than it was originally. But\nmaybe that is because you are much better at sed than me. :)\n\nBut we could put configurations on seperate lines like so:\n\ndiff --git a/Documentation/config/gitcvs.adoc b/Documentation/config/gitcvs.adoc\nindex 02da427fd9..31d7be3992 100644\n--- a/Documentation/config/gitcvs.adoc\n+++ b/Documentation/config/gitcvs.adoc\n@@ -47,7 +47,8 @@ gitcvs.dbDriver::\n        May not contain double colons (`:`). Default: 'SQLite'.\n        See linkgit:git-cvsserver[1].\n \n-gitcvs.dbUser, gitcvs.dbPass::\n+gitcvs.dbUser::\n+gitcvs.dbPass::\n        Database user and password. Only useful if setting `gitcvs.dbDriver`,\n        since SQLite has no concept of database users and/or passwords.\n        'gitcvs.dbUser' supports variable substitution (see\ndiff --git a/Documentation/config/http.adoc b/Documentation/config/http.adoc\nindex 67393282fa..9da5c298cc 100644\n--- a/Documentation/config/http.adoc\n+++ b/Documentation/config/http.adoc\n@@ -289,7 +289,8 @@ for most push problems, but can increase memory consumption\n significantly since the entire buffer is allocated even for small\n pushes.\n \n-http.lowSpeedLimit, http.lowSpeedTime::\n+http.lowSpeedLimit::\n+http.lowSpeedTime::\n        If the HTTP transfer speed, in bytes per second, is less than\n        'http.lowSpeedLimit' for longer than 'http.lowSpeedTime' seconds,\n        the transfer is aborted.\n\nThis is similar to how options are documented, for example:\n\n    $ head Documentation/pretty-options.adoc \n    --pretty[=<format>]::\n    --format=<format>::\n    \n    \tPretty-print the contents of the commit logs in a given format,\n    \twhere '<format>' can be one of 'oneline', 'short', 'medium',\n    \t'full', 'fuller', 'reference', 'email', 'raw', 'format:<string>'\n    \tand 'tformat:<string>'.  When '<format>' is none of the above,\n    \tand has '%placeholder' in it, it acts as if\n    \t'--pretty=tformat:<format>' were given.\n\nThen go back to the simpler sed expression before your most recent\ncommit. I will wait for others thoughts before posting v3.\n\nThanks,\nCollin\n"},{"id":"519509","messageId":"e6a4b604-c5b7-450a-b4f5-3863441e0c6e@intel.com","threadId":"63565","inReplyTo":"875xhducs7.fsf@gmail.com","subject":"Re: [PATCH v2] completion: Make sed command that generates config-list.h portable.","fromName":"Jacob Keller","fromEmail":"jacob.e.keller@intel.com","sentAt":"2025-06-02T21:42:27Z","receivedAt":"2025-06-02T21:42:31Z","isPatch":true,"sender":{"key":"jacob.e.keller@intel.com","avatar":"https://avatars.githubusercontent.com/u/874719?v=4"},"body":"\n\nOn 6/2/2025 1:08 PM, Collin Funk wrote:\n> Jean-Noël AVILA <jn.avila@free.fr> writes:\n> \n>> Your commit message has some issues:\n>>\n>>  * upper case in \"Make\": prefixed commits message must be lower case\n>>  * to be correct, the bug was already there at the first introduction of the \n>> generate-configlist.sh script (3ac68a9). The '\\n' was there, and the generated \n>> .h file had two wrong strings such as\n>> \"gitcvs.dbUserngitcvs.dbPass\" . My patch only put it in light by breaking the \n>> build.\n> \n> Thanks, I will keep that in mind for V3.\n> \n>> Maybe an alternative way of fixing the issue is to just rework the \n>> documentation on the two spots where a comma is used and put each config \n>> variable on its own line.\n>>\n>> What do you think?\n> \n> Regarding readability, it is not any worse than it was originally. But\n> maybe that is because you are much better at sed than me. :)\n> \n> But we could put configurations on seperate lines like so:\n> \n> diff --git a/Documentation/config/gitcvs.adoc b/Documentation/config/gitcvs.adoc\n> index 02da427fd9..31d7be3992 100644\n> --- a/Documentation/config/gitcvs.adoc\n> +++ b/Documentation/config/gitcvs.adoc\n> @@ -47,7 +47,8 @@ gitcvs.dbDriver::\n>         May not contain double colons (`:`). Default: 'SQLite'.\n>         See linkgit:git-cvsserver[1].\n>  \n> -gitcvs.dbUser, gitcvs.dbPass::\n> +gitcvs.dbUser::\n> +gitcvs.dbPass::\n>         Database user and password. Only useful if setting `gitcvs.dbDriver`,\n>         since SQLite has no concept of database users and/or passwords.\n>         'gitcvs.dbUser' supports variable substitution (see\n> diff --git a/Documentation/config/http.adoc b/Documentation/config/http.adoc\n> index 67393282fa..9da5c298cc 100644\n> --- a/Documentation/config/http.adoc\n> +++ b/Documentation/config/http.adoc\n> @@ -289,7 +289,8 @@ for most push problems, but can increase memory consumption\n>  significantly since the entire buffer is allocated even for small\n>  pushes.\n>  \n> -http.lowSpeedLimit, http.lowSpeedTime::\n> +http.lowSpeedLimit::\n> +http.lowSpeedTime::\n>         If the HTTP transfer speed, in bytes per second, is less than\n>         'http.lowSpeedLimit' for longer than 'http.lowSpeedTime' seconds,\n>         the transfer is aborted.\n> \n> This is similar to how options are documented, for example:\n> \n>     $ head Documentation/pretty-options.adoc \n>     --pretty[=<format>]::\n>     --format=<format>::\n>     \n>     \tPretty-print the contents of the commit logs in a given format,\n>     \twhere '<format>' can be one of 'oneline', 'short', 'medium',\n>     \t'full', 'fuller', 'reference', 'email', 'raw', 'format:<string>'\n>     \tand 'tformat:<string>'.  When '<format>' is none of the above,\n>     \tand has '%placeholder' in it, it acts as if\n>     \t'--pretty=tformat:<format>' were given.\n> \n> Then go back to the simpler sed expression before your most recent\n> commit. I will wait for others thoughts before posting v3.\n> \n\nI like this approach.\n\n> Thanks,\n> Collin\n> \n\n"},{"id":"519511","messageId":"59b2a12a3f43cf078fbeaf0271b5a7cfffc9eb8f.1748903426.git.collin.funk1@gmail.com","threadId":"63565","inReplyTo":"0ab924839df48d869682bea1b0cb400f378ca6dc.1748889654.git.collin.funk1@gmail.com","subject":"[PATCH v3] completion: make sed command that generates config-list.h portable.","fromName":"Collin Funk","fromEmail":"collin.funk1@gmail.com","sentAt":"2025-06-02T22:31:32Z","receivedAt":"2025-06-02T22:32:13Z","isPatch":true,"sender":{"key":"collin.funk1@gmail.com","avatar":"https://avatars.githubusercontent.com/u/65689063?v=4"},"body":"The OpenBSD 'sed' command does not support '\\n' to represent newlines in\nsed expressions. This leads to the follow compiler error:\n\n    In file included from builtin/help.c:15:\n    ./config-list.h:282:18: error: use of undeclared identifier 'n'\n            \"gitcvs.dbUser\",n       \"gitcvs.dbPass\",\n                            ^\n    1 error generated.\n    gmake: *** [Makefile:2821: builtin/help.o] Error 1\n\nWe can fix this by documenting related configuration variables\none-per-line instead of listing them separated by commas. This allows us\nto remove the unportable part of the sed expression in\ngenerate-configlist.sh.\n\nSigned-off-by: Collin Funk <collin.funk1@gmail.com>\n---\n Documentation/config/gitcvs.adoc | 3 ++-\n Documentation/config/http.adoc   | 3 ++-\n generate-configlist.sh           | 1 -\n 3 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/config/gitcvs.adoc b/Documentation/config/gitcvs.adoc\nindex 02da427fd9..31d7be3992 100644\n--- a/Documentation/config/gitcvs.adoc\n+++ b/Documentation/config/gitcvs.adoc\n@@ -47,7 +47,8 @@ gitcvs.dbDriver::\n \tMay not contain double colons (`:`). Default: 'SQLite'.\n \tSee linkgit:git-cvsserver[1].\n \n-gitcvs.dbUser, gitcvs.dbPass::\n+gitcvs.dbUser::\n+gitcvs.dbPass::\n \tDatabase user and password. Only useful if setting `gitcvs.dbDriver`,\n \tsince SQLite has no concept of database users and/or passwords.\n \t'gitcvs.dbUser' supports variable substitution (see\ndiff --git a/Documentation/config/http.adoc b/Documentation/config/http.adoc\nindex 67393282fa..9da5c298cc 100644\n--- a/Documentation/config/http.adoc\n+++ b/Documentation/config/http.adoc\n@@ -289,7 +289,8 @@ for most push problems, but can increase memory consumption\n significantly since the entire buffer is allocated even for small\n pushes.\n \n-http.lowSpeedLimit, http.lowSpeedTime::\n+http.lowSpeedLimit::\n+http.lowSpeedTime::\n \tIf the HTTP transfer speed, in bytes per second, is less than\n \t'http.lowSpeedLimit' for longer than 'http.lowSpeedTime' seconds,\n \tthe transfer is aborted.\ndiff --git a/generate-configlist.sh b/generate-configlist.sh\nindex b06da53c89..9d2ad6165d 100755\n--- a/generate-configlist.sh\n+++ b/generate-configlist.sh\n@@ -19,7 +19,6 @@ EOF\n \ts/::$//;\n \ts/`//g;\n \ts/^.*$/\t\"&\",/;\n-\ts/,  */\",\\n\t\"/g;\n \tp;};\n d' \\\n \t    \"$SOURCE_DIR\"/Documentation/*config.adoc \\\n-- \n2.49.0\n\n"},{"id":"519512","messageId":"87msapsrfi.fsf@gmail.com","threadId":"63565","inReplyTo":"e6a4b604-c5b7-450a-b4f5-3863441e0c6e@intel.com","subject":"Re: [PATCH v2] completion: Make sed command that generates config-list.h portable.","fromName":"Collin Funk","fromEmail":"collin.funk1@gmail.com","sentAt":"2025-06-02T22:35:13Z","receivedAt":"2025-06-02T22:35:15Z","isPatch":true,"sender":{"key":"collin.funk1@gmail.com","avatar":"https://avatars.githubusercontent.com/u/65689063?v=4"},"body":"Hi Jacob,\n\nJacob Keller <jacob.e.keller@intel.com> writes:\n\n>> Then go back to the simpler sed expression before your most recent\n>> commit. I will wait for others thoughts before posting v3.\n>> \n>\n> I like this approach.\n\nThanks for checking.\n\nAlthough, I now realize my explination was slightly incorrect. Some of\nthe referenced commit is still needed for formatting, but we can remove\npart of the expression that causes the problem.\n\nI posted V3 so others can check.\n\nCollin\n"},{"id":"519516","messageId":"CO1PR11MB508935F77DB5D7CA29BF8D79D662A@CO1PR11MB5089.namprd11.prod.outlook.com","threadId":"63565","inReplyTo":"59b2a12a3f43cf078fbeaf0271b5a7cfffc9eb8f.1748903426.git.collin.funk1@gmail.com","subject":"RE: [PATCH v3] completion: make sed command that generates config-list.h portable.","fromName":"Keller, Jacob E","fromEmail":"jacob.e.keller@intel.com","sentAt":"2025-06-02T23:05:20Z","receivedAt":"2025-06-02T23:05:37Z","isPatch":true,"sender":{"key":"jacob.e.keller@intel.com","avatar":"https://avatars.githubusercontent.com/u/874719?v=4"},"body":"\n\n> -----Original Message-----\n> From: Collin Funk <collin.funk1@gmail.com>\n> Sent: Monday, June 2, 2025 3:32 PM\n> To: git@vger.kernel.org\n> Cc: jn.avila@free.fr; Keller, Jacob E <jacob.e.keller@intel.com>; Collin Funk\n> <collin.funk1@gmail.com>; Corentin Garcia <corenting@gmail.com>; Junio C\n> Hamano <gitster@pobox.com>\n> Subject: [PATCH v3] completion: make sed command that generates config-list.h\n> portable.\n> \n> The OpenBSD 'sed' command does not support '\\n' to represent newlines in\n> sed expressions. This leads to the follow compiler error:\n> \n>     In file included from builtin/help.c:15:\n>     ./config-list.h:282:18: error: use of undeclared identifier 'n'\n>             \"gitcvs.dbUser\",n       \"gitcvs.dbPass\",\n>                             ^\n>     1 error generated.\n>     gmake: *** [Makefile:2821: builtin/help.o] Error 1\n> \n> We can fix this by documenting related configuration variables\n> one-per-line instead of listing them separated by commas. This allows us\n> to remove the unportable part of the sed expression in\n> generate-configlist.sh.\n> \n> Signed-off-by: Collin Funk <collin.funk1@gmail.com>\n> ---\n\nReviewed-by: Jacob Keller <jacob.e.keller@intel.com>\n"},{"id":"519517","messageId":"xmqqtt4xsmof.fsf@gitster.g","threadId":"63565","inReplyTo":"CO1PR11MB508935F77DB5D7CA29BF8D79D662A@CO1PR11MB5089.namprd11.prod.outlook.com","subject":"Re: [PATCH v3] completion: make sed command that generates config-list.h portable.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-06-03T00:17:52Z","receivedAt":"2025-06-03T00:17:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Keller, Jacob E\" <jacob.e.keller@intel.com> writes:\n\n>> -----Original Message-----\n>> From: Collin Funk <collin.funk1@gmail.com>\n>> Sent: Monday, June 2, 2025 3:32 PM\n>> To: git@vger.kernel.org\n>> Cc: jn.avila@free.fr; Keller, Jacob E <jacob.e.keller@intel.com>; Collin Funk\n>> <collin.funk1@gmail.com>; Corentin Garcia <corenting@gmail.com>; Junio C\n>> Hamano <gitster@pobox.com>\n>> Subject: [PATCH v3] completion: make sed command that generates config-list.h\n>> portable.\n>> \n>> The OpenBSD 'sed' command does not support '\\n' to represent newlines in\n>> sed expressions. This leads to the follow compiler error:\n>> \n>>     In file included from builtin/help.c:15:\n>>     ./config-list.h:282:18: error: use of undeclared identifier 'n'\n>>             \"gitcvs.dbUser\",n       \"gitcvs.dbPass\",\n>>                             ^\n>>     1 error generated.\n>>     gmake: *** [Makefile:2821: builtin/help.o] Error 1\n>> \n>> We can fix this by documenting related configuration variables\n>> one-per-line instead of listing them separated by commas. This allows us\n>> to remove the unportable part of the sed expression in\n>> generate-configlist.sh.\n>> \n>> Signed-off-by: Collin Funk <collin.funk1@gmail.com>\n>> ---\n>\n> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>\n\nThanks, all.\n"},{"id":"519518","messageId":"xmqqplflsmic.fsf@gitster.g","threadId":"63565","inReplyTo":"e6a4b604-c5b7-450a-b4f5-3863441e0c6e@intel.com","subject":"Re: [PATCH v2] completion: Make sed command that generates config-list.h portable.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-06-03T00:21:31Z","receivedAt":"2025-06-03T00:21:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jacob Keller <jacob.e.keller@intel.com> writes:\n\n>> But we could put configurations on seperate lines like so:\n>> \n>> ... \n>> -gitcvs.dbUser, gitcvs.dbPass::\n>> +gitcvs.dbUser::\n>> +gitcvs.dbPass::\n>> ...\n>> Then go back to the simpler sed expression before your most recent\n>> commit. I will wait for others thoughts before posting v3.\n>\n> I like this approach.\n\nAs long as we warn our documenters that comma separated entries are\nforbidden in our documentation (even though AsciiDoc and Asciidoctor\nmay allow them), it would be the simplest.  The question is where.\n\nPerhaps the tail end of the CodingGuidelines document where we\nalready have write-up for markups?\n\nThanks.\n\n"},{"id":"519520","messageId":"45c586122afab8ae3624be6963d64e770b7396b2.1748911713.git.collin.funk1@gmail.com","threadId":"63565","inReplyTo":"xmqqplflsmic.fsf@gitster.g","subject":"[PATCH] CodingGuidelines: document formatting required by generate-configlist.sh.","fromName":"Collin Funk","fromEmail":"collin.funk1@gmail.com","sentAt":"2025-06-03T00:49:12Z","receivedAt":"2025-06-03T00:50:06Z","isPatch":true,"sender":{"key":"collin.funk1@gmail.com","avatar":"https://avatars.githubusercontent.com/u/65689063?v=4"},"body":"Document that related `git config` variables should be placed\none-per-line instead of separated by commas.\n\nSuggested-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: Collin Funk <collin.funk1@gmail.com>\n---\n Documentation/CodingGuidelines | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines\nindex c1046abfb7..3a7e644acf 100644\n--- a/Documentation/CodingGuidelines\n+++ b/Documentation/CodingGuidelines\n@@ -877,6 +877,15 @@ Characters are also surrounded by underscores:\n As a side effect, backquoted placeholders are correctly typeset, but\n this style is not recommended.\n \n+ When documenting multiple related `git config` variables, place them on\n+ a separate line instead of separating them by commas. For example:\n+   core.var1::\n+   core.var2::\n+  \tThis is a description of 'core.var1' and 'core.var2'.\n+\n+This format is required for the `generate-configlist.sh` script to\n+properly generate \"config-list.h\".\n+\n Synopsis Syntax\n \n  The synopsis (a paragraph with [synopsis] attribute) is automatically\n-- \n2.49.0\n\n"},{"id":"519574","messageId":"xmqqiklcri3o.fsf@gitster.g","threadId":"63565","inReplyTo":"45c586122afab8ae3624be6963d64e770b7396b2.1748911713.git.collin.funk1@gmail.com","subject":"Re: [PATCH] CodingGuidelines: document formatting required by generate-configlist.sh.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-06-03T14:54:19Z","receivedAt":"2025-06-03T14:54:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Collin Funk <collin.funk1@gmail.com> writes:\n\n> + When documenting multiple related `git config` variables, place them on\n> + a separate line instead of separating them by commas. For example:\n> +   core.var1::\n> +   core.var2::\n> +  \tThis is a description of 'core.var1' and 'core.var2'.\n\nAs `core.varN` in the above example are all what the end-user would\ngive literally, just like `git config` command name in the first\nsentence, they should be marked up as literal strings, i.e.\n\n    ... For example, do not write this:\n\n    `core.var1`, `core.var2`::\n\tDescription common to `core.var1` and `core.var2`.\n\t\n    Instead write this:\n\n    `core.var1`::\n    `core.var2`::\n\tDescription common to `core.var1` and `core.var2`.\n\n> +This format is required for the `generate-configlist.sh` script to\n> +properly generate \"config-list.h\".\n\nIt is not wrong per-se, but this tempts people to \"fix\" the\ngenerate-configlist.sh script so that it can grok the comma\nseparated list \"again\".  And when that fix is done and reviewed\ncarelessly, we'd again break some implementations of sed the same\nway and we will come back full circle ;-)\n\n\nWhen we standardized writing negatable options this way\n\n    `--option`::\n    `--no-option`::\n\tDescription of `--option` that can be turned off with\n\t`--no-option`.\n\ninstead of\n\n    `--[no-]option`::\n\tDescription of `--option` that can be turned off with\n\t`--no-option`.\n\nwe explained that the reason why we want to do so is because it is\neasier to \"grep\".  Does this \"do not comma-list variables, but list\nthem one per line\" also give us better greppability, and if so we\nwant to explain that way, perhaps?\n\n    $ git grep '`core\\.var1`::' Documentation/config/\n\nThanks.\n"},{"id":"519586","messageId":"87sekgpsbe.fsf@gmail.com","threadId":"63565","inReplyTo":"xmqqiklcri3o.fsf@gitster.g","subject":"Re: [PATCH] CodingGuidelines: document formatting required by generate-configlist.sh.","fromName":"Collin Funk","fromEmail":"collin.funk1@gmail.com","sentAt":"2025-06-03T18:56:37Z","receivedAt":"2025-06-03T18:56:39Z","isPatch":true,"sender":{"key":"collin.funk1@gmail.com","avatar":"https://avatars.githubusercontent.com/u/65689063?v=4"},"body":"Hi Junio,\n\nJunio C Hamano <gitster@pobox.com> writes:\n\n> Collin Funk <collin.funk1@gmail.com> writes:\n>\n>> + When documenting multiple related `git config` variables, place them on\n>> + a separate line instead of separating them by commas. For example:\n>> +   core.var1::\n>> +   core.var2::\n>> +  \tThis is a description of 'core.var1' and 'core.var2'.\n>\n> As `core.varN` in the above example are all what the end-user would\n> give literally, just like `git config` command name in the first\n> sentence, they should be marked up as literal strings, i.e.\n>\n>     ... For example, do not write this:\n>\n>     `core.var1`, `core.var2`::\n> \tDescription common to `core.var1` and `core.var2`.\n> \t\n>     Instead write this:\n>\n>     `core.var1`::\n>     `core.var2`::\n> \tDescription common to `core.var1` and `core.var2`.\n\nThis markup is different than what is used in\nDocumentation/config/*.adoc though. Here is just one example:\n\n    $ head -n 3 Documentation/config/core.adoc \n    core.fileMode::\n    \tTells Git if the executable bit of files in the working tree\n    \tis to be honored.\n\nThat was my reasoning for writing it how I did in the patch. Are you\nsaying that all of these should be changed? I do not have any experience\nwith AsciiDoc so I am not sure if that is correct.\n\n>> +This format is required for the `generate-configlist.sh` script to\n>> +properly generate \"config-list.h\".\n>\n> It is not wrong per-se, but this tempts people to \"fix\" the\n> generate-configlist.sh script so that it can grok the comma\n> separated list \"again\".  And when that fix is done and reviewed\n> carelessly, we'd again break some implementations of sed the same\n> way and we will come back full circle ;-)\n> [...]\n> we explained that the reason why we want to do so is because it is\n> easier to \"grep\".  Does this \"do not comma-list variables, but list\n> them one per line\" also give us better greppability, and if so we\n> want to explain that way, perhaps?\n>\n>     $ git grep '`core\\.var1`::' Documentation/config/\n\nYes, that is a good side affect of the change that can be documented.\n\nI will send V2 after clarification on the other point.\n\nCollin\n"},{"id":"519592","messageId":"xmqq5xhcimid.fsf@gitster.g","threadId":"63565","inReplyTo":"87sekgpsbe.fsf@gmail.com","subject":"Re: [PATCH] CodingGuidelines: document formatting required by generate-configlist.sh.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-06-03T20:43:54Z","receivedAt":"2025-06-03T20:43:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Collin Funk <collin.funk1@gmail.com> writes:\n\n>>     `core.var1`::\n>>     `core.var2`::\n>> \tDescription common to `core.var1` and `core.var2`.\n>\n> This markup is different than what is used in\n> Documentation/config/*.adoc though.\n\nWe are updating them gradually while avoiding collisions with\npatches that do other \"real\" work; see many recent patches to\nDocumentation/config/ area by Jean-Noël Avila for more, e.g.\nd30c5cc4 (doc: convert git-mergetool options to new synopsis style,\n2025-05-25).\n\nThanks.\n"},{"id":"519610","messageId":"802402a288f0976765f1ba1c82d14c2289c8cf72.1748990700.git.collin.funk1@gmail.com","threadId":"63565","inReplyTo":"45c586122afab8ae3624be6963d64e770b7396b2.1748911713.git.collin.funk1@gmail.com","subject":"[PATCH v2] CodingGuidelines: document formatting of similar config variables.","fromName":"Collin Funk","fromEmail":"collin.funk1@gmail.com","sentAt":"2025-06-03T22:45:39Z","receivedAt":"2025-06-03T22:46:05Z","isPatch":true,"sender":{"key":"collin.funk1@gmail.com","avatar":"https://avatars.githubusercontent.com/u/65689063?v=4"},"body":"Document that related `git config` variables should be placed\none-per-line instead of separated by commas.\n\nSuggested-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: Collin Funk <collin.funk1@gmail.com>\n---\n Documentation/CodingGuidelines | 11 +++++++++++\n 1 file changed, 11 insertions(+)\n\ndiff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines\nindex c1046abfb7..3dd339f802 100644\n--- a/Documentation/CodingGuidelines\n+++ b/Documentation/CodingGuidelines\n@@ -877,6 +877,17 @@ Characters are also surrounded by underscores:\n As a side effect, backquoted placeholders are correctly typeset, but\n this style is not recommended.\n \n+ When documenting multiple related `git config` variables, place them on\n+ a separate line instead of separating them by commas.  For example, do\n+ not write this:\n+   `core.var1`, `core.var2`::\n+  \tDescription common to `core.var1` and `core.var2`.\n+\n+Instead write this:\n+   `core.var1`::\n+   `core.var2`::\n+  \tDescription common to `core.var1` and `core.var2`.\n+\n Synopsis Syntax\n \n  The synopsis (a paragraph with [synopsis] attribute) is automatically\n-- \n2.49.0\n\n"},{"id":"519611","messageId":"8734cgphj9.fsf@gmail.com","threadId":"63565","inReplyTo":"xmqq5xhcimid.fsf@gitster.g","subject":"Re: [PATCH] CodingGuidelines: document formatting required by generate-configlist.sh.","fromName":"Collin Funk","fromEmail":"collin.funk1@gmail.com","sentAt":"2025-06-03T22:49:30Z","receivedAt":"2025-06-03T22:49:32Z","isPatch":true,"sender":{"key":"collin.funk1@gmail.com","avatar":"https://avatars.githubusercontent.com/u/65689063?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> We are updating them gradually while avoiding collisions with\n> patches that do other \"real\" work; see many recent patches to\n> Documentation/config/ area by Jean-Noël Avila for more, e.g.\n> d30c5cc4 (doc: convert git-mergetool options to new synopsis style,\n> 2025-05-25).\n\nAh, okay. I must have just looked at files that have not been touched in\nsome time.\n\nI sent V2 which uses the example you sent [1]. Feel free to add yourself\nas 'Co-authored-by:'.\n\nThanks,\nCollin\n\n[1] https://lore.kernel.org/git/802402a288f0976765f1ba1c82d14c2289c8cf72.1748990700.git.collin.funk1@gmail.com/T/#u\n"},{"id":"519621","messageId":"xmqqldq8fkfe.fsf@gitster.g","threadId":"63565","inReplyTo":"802402a288f0976765f1ba1c82d14c2289c8cf72.1748990700.git.collin.funk1@gmail.com","subject":"Re: [PATCH v2] CodingGuidelines: document formatting of similar config variables.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-06-03T23:57:09Z","receivedAt":"2025-06-03T23:57:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Collin Funk <collin.funk1@gmail.com> writes:\n\n> Document that related `git config` variables should be placed\n> one-per-line instead of separated by commas.\n>\n> Suggested-by: Junio C Hamano <gitster@pobox.com>\n> Signed-off-by: Collin Funk <collin.funk1@gmail.com>\n> ---\n>  Documentation/CodingGuidelines | 11 +++++++++++\n>  1 file changed, 11 insertions(+)\n\nLooks good.  Thanks.\n\n> diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines\n> index c1046abfb7..3dd339f802 100644\n> --- a/Documentation/CodingGuidelines\n> +++ b/Documentation/CodingGuidelines\n> @@ -877,6 +877,17 @@ Characters are also surrounded by underscores:\n>  As a side effect, backquoted placeholders are correctly typeset, but\n>  this style is not recommended.\n>  \n> + When documenting multiple related `git config` variables, place them on\n> + a separate line instead of separating them by commas.  For example, do\n> + not write this:\n> +   `core.var1`, `core.var2`::\n> +  \tDescription common to `core.var1` and `core.var2`.\n> +\n> +Instead write this:\n> +   `core.var1`::\n> +   `core.var2`::\n> +  \tDescription common to `core.var1` and `core.var2`.\n> +\n>  Synopsis Syntax\n>  \n>   The synopsis (a paragraph with [synopsis] attribute) is automatically\n"}]}