Subject: Re: [PATCH v2] CI: select CC based on CC_PACKAGE (again)

From: Junio C Hamano <[email-masked]>
Date: Thu, 21 Apr 2022 12:11:58 -0700

Carlo Arenas <[email-masked]> 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.