From: Junio C Hamano <gitster@pobox.com>
To: Carlo Arenas <carenas@gmail.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
git@vger.kernel.org, "Eric Sunshine" <sunshine@sunshineco.com>,
"Phillip Wood" <phillip.wood@talktalk.net>
Subject: Re: [PATCH v2] CI: select CC based on CC_PACKAGE (again)
Date: Thu, 21 Apr 2022 12:11:58 -0700 [thread overview]
Message-ID: <xmqqv8v2gsjl.fsf@gitster.g> (raw)
In-Reply-To: <CAPUEspggNfra_C8PBcVqjZrxxnswg27WFLg2kT6JOCMB8f0FGg@mail.gmail.com> (Carlo Arenas's message of "Thu, 21 Apr 2022 12:05:20 -0700")
Carlo Arenas <carenas@gmail.com> writes:
>> - CC="${CC:-gcc}"
>> + CC="${CC_PACKAGE:-${CC:-gcc}}"
>
> minor nitpick, but most likely still relevant considering your other
> "bashism" fixes.
> the POSIX syntax doesn't use ":" (documented in CodingGuidelines)
You are reading the guideline wrong, I am afraid.
This is not a substring substitution, ${foo:0:3} picking three
characters from the beginning of foo.
It is "If CC_PACKAGE is UNSET OR SET TO EMPTY, then use the fallback
value that is ${CC:-gcc}", which is a bog standard bourne shell that
predates POSIX. The colon before "-" is what adds "OR SET TO EMPTY"
part; without the colon, i.e. "${CC_PACKAGE-${CC-gcc}}", then you
get the same without "OR SET TO EMPTY" part.
And we do use that form.
next prev parent reply other threads:[~2022-04-21 19:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 13:03 [PATCH] CI: select CC based on CC_PACKAGE (again) Ævar Arnfjörð Bjarmason
2022-04-21 16:26 ` Phillip Wood
2022-04-21 17:48 ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2022-04-21 19:05 ` Carlo Arenas
2022-04-21 19:11 ` Junio C Hamano [this message]
2022-04-21 19:22 ` Carlo Arenas
2022-04-21 19:47 ` Junio C Hamano
2022-04-21 19:08 ` Junio C Hamano
2022-04-21 19:13 ` Ævar Arnfjörð Bjarmason
2022-04-21 19:51 ` Junio C Hamano
2022-04-21 19:52 ` Ævar Arnfjörð Bjarmason
2022-04-21 19:55 ` Junio C Hamano
2022-04-22 9:20 ` [PATCH v3] " Ævar Arnfjörð Bjarmason
2022-04-22 9:25 ` Phillip Wood
2022-04-22 11:43 ` Ævar Arnfjörð Bjarmason
2022-04-22 18:27 ` Junio C Hamano
2022-04-22 22:40 ` Junio C Hamano
2022-04-22 22:46 ` Ævar Arnfjörð Bjarmason
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=xmqqv8v2gsjl.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=carenas@gmail.com \
--cc=git@vger.kernel.org \
--cc=phillip.wood@talktalk.net \
--cc=sunshine@sunshineco.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;
as well as URLs for NNTP newsgroup(s).