git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Collin Funk <collin.funk1@gmail.com>
To: git@vger.kernel.org
Cc: jn.avila@free.fr, jacob.e.keller@intel.com,
	Collin Funk <collin.funk1@gmail.com>,
	Corentin Garcia <corenting@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v3] completion: make sed command that generates config-list.h portable.
Date: Mon,  2 Jun 2025 15:31:32 -0700	[thread overview]
Message-ID: <59b2a12a3f43cf078fbeaf0271b5a7cfffc9eb8f.1748903426.git.collin.funk1@gmail.com> (raw)
In-Reply-To: <0ab924839df48d869682bea1b0cb400f378ca6dc.1748889654.git.collin.funk1@gmail.com>

The OpenBSD 'sed' command does not support '\n' to represent newlines in
sed expressions. This leads to the follow compiler error:

    In file included from builtin/help.c:15:
    ./config-list.h:282:18: error: use of undeclared identifier 'n'
            "gitcvs.dbUser",n       "gitcvs.dbPass",
                            ^
    1 error generated.
    gmake: *** [Makefile:2821: builtin/help.o] Error 1

We can fix this by documenting related configuration variables
one-per-line instead of listing them separated by commas. This allows us
to remove the unportable part of the sed expression in
generate-configlist.sh.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
---
 Documentation/config/gitcvs.adoc | 3 ++-
 Documentation/config/http.adoc   | 3 ++-
 generate-configlist.sh           | 1 -
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/config/gitcvs.adoc b/Documentation/config/gitcvs.adoc
index 02da427fd9..31d7be3992 100644
--- a/Documentation/config/gitcvs.adoc
+++ b/Documentation/config/gitcvs.adoc
@@ -47,7 +47,8 @@ gitcvs.dbDriver::
 	May not contain double colons (`:`). Default: 'SQLite'.
 	See linkgit:git-cvsserver[1].
 
-gitcvs.dbUser, gitcvs.dbPass::
+gitcvs.dbUser::
+gitcvs.dbPass::
 	Database user and password. Only useful if setting `gitcvs.dbDriver`,
 	since SQLite has no concept of database users and/or passwords.
 	'gitcvs.dbUser' supports variable substitution (see
diff --git a/Documentation/config/http.adoc b/Documentation/config/http.adoc
index 67393282fa..9da5c298cc 100644
--- a/Documentation/config/http.adoc
+++ b/Documentation/config/http.adoc
@@ -289,7 +289,8 @@ for most push problems, but can increase memory consumption
 significantly since the entire buffer is allocated even for small
 pushes.
 
-http.lowSpeedLimit, http.lowSpeedTime::
+http.lowSpeedLimit::
+http.lowSpeedTime::
 	If the HTTP transfer speed, in bytes per second, is less than
 	'http.lowSpeedLimit' for longer than 'http.lowSpeedTime' seconds,
 	the transfer is aborted.
diff --git a/generate-configlist.sh b/generate-configlist.sh
index b06da53c89..9d2ad6165d 100755
--- a/generate-configlist.sh
+++ b/generate-configlist.sh
@@ -19,7 +19,6 @@ EOF
 	s/::$//;
 	s/`//g;
 	s/^.*$/	"&",/;
-	s/,  */",\n	"/g;
 	p;};
 d' \
 	    "$SOURCE_DIR"/Documentation/*config.adoc \
-- 
2.49.0


  parent reply	other threads:[~2025-06-02 22:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02 18:41 [PATCH] completion: Make sed command that generates config-list.h portable Collin Funk
2025-06-02 19:05 ` Brad Smith
2025-06-02 19:05 ` Jean-Noël AVILA
2025-06-02 19:20   ` Collin Funk
2025-06-02 19:26 ` [PATCH v2] " Collin Funk
2025-06-02 19:49   ` Jean-Noël AVILA
2025-06-02 20:08     ` Collin Funk
2025-06-02 21:42       ` Jacob Keller
2025-06-02 22:35         ` Collin Funk
2025-06-03  0:21         ` Junio C Hamano
2025-06-03  0:49           ` [PATCH] CodingGuidelines: document formatting required by generate-configlist.sh Collin Funk
2025-06-03 14:54             ` Junio C Hamano
2025-06-03 18:56               ` Collin Funk
2025-06-03 20:43                 ` Junio C Hamano
2025-06-03 22:49                   ` Collin Funk
2025-06-03 22:45             ` [PATCH v2] CodingGuidelines: document formatting of similar config variables Collin Funk
2025-06-03 23:57               ` Junio C Hamano
2025-06-02 22:31 ` Collin Funk [this message]
2025-06-02 23:05   ` [PATCH v3] completion: make sed command that generates config-list.h portable Keller, Jacob E
2025-06-03  0:17     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59b2a12a3f43cf078fbeaf0271b5a7cfffc9eb8f.1748903426.git.collin.funk1@gmail.com \
    --to=collin.funk1@gmail.com \
    --cc=corenting@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jn.avila@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).