From: Collin Funk <collin.funk1@gmail.com>
To: Brad Smith <brad@comstyle.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: Solaris sed
Date: Wed, 11 Jun 2025 21:19:35 -0700 [thread overview]
Message-ID: <874iwlegmg.fsf@gmail.com> (raw)
In-Reply-To: <caaa5d54-d32d-40b3-9bf3-0f322e7c4316@comstyle.com>
Brad Smith <brad@comstyle.com> writes:
>> Totally untested patch follows.
>>
>> GIT-VERSION-GEN | 2 +-
>> generate-configlist.sh | 8 ++++----
>> 2 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git c/GIT-VERSION-GEN w/GIT-VERSION-GEN
>> index 208e91a17f..de989657fb 100755
>> --- c/GIT-VERSION-GEN
>> +++ w/GIT-VERSION-GEN
>> @@ -82,7 +82,7 @@ read GIT_MAJOR_VERSION GIT_MINOR_VERSION GIT_MICRO_VERSION GIT_PATCH_LEVEL trail
>> $(echo "$GIT_VERSION" 0 0 0 0 | tr '.a-zA-Z-' ' ')
>> EOF
>> -REPLACED=$(printf "%s" "$INPUT" | sed -e
>> "s|@GIT_VERSION@|$GIT_VERSION|" \
>> +REPLACED=$(printf "%s\n" "$INPUT" | sed -e "s|@GIT_VERSION@|$GIT_VERSION|" \
>> -e "s|@GIT_MAJOR_VERSION@|$GIT_MAJOR_VERSION|" \
>> -e "s|@GIT_MINOR_VERSION@|$GIT_MINOR_VERSION|" \
>> -e "s|@GIT_MICRO_VERSION@|$GIT_MICRO_VERSION|" \
>> diff --git c/generate-configlist.sh w/generate-configlist.sh
>> index 9d2ad6165d..75c39ade20 100755
>> --- c/generate-configlist.sh
>> +++ w/generate-configlist.sh
>> @@ -13,16 +13,16 @@ print_config_list () {
>> cat <<EOF
>> static const char *config_name_list[] = {
>> EOF
>> - sed -E '
>> -/^`?[a-zA-Z].*\..*`?::$/ {
>> + sed -e '
>> + /^`*[a-zA-Z].*\..*`*::$/ {
>> /deprecated/d;
>> s/::$//;
>> s/`//g;
>> s/^.*$/ "&",/;
>> p;};
>> -d' \
>> + d' \
>> "$SOURCE_DIR"/Documentation/*config.adoc \
>> - "$SOURCE_DIR"/Documentation/config/*.adoc|
>> + "$SOURCE_DIR"/Documentation/config/*.adoc |
>> sort
>> cat <<EOF
>> NULL,
>
>
> No errors or warnings after this is applied.
Likewise.
I checked on my Linux machine and both files are the same before and
after the patch. Before the patch on Solaris 10, the following is
generated:
/* Automatically generated by generate-configlist.sh */
static const char *config_name_list[] = {
NULL,
};
After the patch the output on Solaris is the same as on Linux.
So the patch is perfect.
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
Collin
next prev parent reply other threads:[~2025-06-12 4:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-12 3:23 Solaris sed Brad Smith
2025-06-12 3:42 ` Collin Funk
2025-06-12 3:49 ` Brad Smith
2025-06-12 4:16 ` Eli Schwartz
2025-06-12 4:25 ` Collin Funk
2025-06-12 4:26 ` Brad Smith
2025-06-12 4:03 ` Junio C Hamano
2025-06-12 4:13 ` Brad Smith
2025-06-12 4:19 ` Collin Funk [this message]
2025-06-13 20:13 ` Jean-Noël AVILA
2025-06-13 20:23 ` Eric Sunshine
2025-06-13 20:30 ` Collin Funk
2025-06-12 5:50 ` Eric Sunshine
2025-06-12 13:35 ` Paul Smith
2025-06-12 16:40 ` Eric Sunshine
-- strict thread matches above, loose matches on Subject: below --
2025-06-12 22:52 Ben Knoble
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=874iwlegmg.fsf@gmail.com \
--to=collin.funk1@gmail.com \
--cc=brad@comstyle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox