From: "Jean-Noël AVILA" <jn.avila@free.fr>
To: git@vger.kernel.org, Collin Funk <collin.funk1@gmail.com>
Cc: Collin Funk <collin.funk1@gmail.com>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2] completion: Make sed command that generates config-list.h portable.
Date: Mon, 02 Jun 2025 21:49:28 +0200 [thread overview]
Message-ID: <3631972.iIbC2pHGDl@cayenne> (raw)
In-Reply-To: <1ff542bb1090cc5185644d6032addac5cd0df402.1748892261.git.collin.funk1@gmail.com>
On Monday, 2 June 2025 21:26:47 CEST Collin Funk wrote:
> 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 use a backslash followed by a newline to fix this.
>
> This portably issue was introduced in e1b81f54da (completion: take into
> account the formatting backticks for options, 2025-03-19)
>
> Signed-off-by: Collin Funk <collin.funk1@gmail.com>
> ---
> generate-configlist.sh | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/generate-configlist.sh b/generate-configlist.sh
> index b06da53c89..e1f9e99488 100755
> --- a/generate-configlist.sh
> +++ b/generate-configlist.sh
> @@ -19,7 +19,8 @@ EOF
> s/::$//;
> s/`//g;
> s/^.*$/ "&",/;
> - s/, */",\n "/g;
> + s/, */",\
> + "/g;
> p;};
> d' \
> "$SOURCE_DIR"/Documentation/*config.adoc \
FYI I pushed your patch to
https://github.com/gitgitgadget/git/pull/1930/
It seems to be passing, although it's not very readable.
Your commit message has some issues:
* upper case in "Make": prefixed commits message must be lower case
* to be correct, the bug was already there at the first introduction of the
generate-configlist.sh script (3ac68a9). The '\n' was there, and the generated
.h file had two wrong strings such as
"gitcvs.dbUserngitcvs.dbPass" . My patch only put it in light by breaking the
build.
Maybe an alternative way of fixing the issue is to just rework the
documentation on the two spots where a comma is used and put each config
variable on its own line.
What do you think?
JN
next prev parent reply other threads:[~2025-06-02 19:49 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 [this message]
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 ` [PATCH v3] completion: make sed command that generates config-list.h portable Collin Funk
2025-06-02 23:05 ` 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=3631972.iIbC2pHGDl@cayenne \
--to=jn.avila@free.fr \
--cc=collin.funk1@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.