Re: [PATCH v2 01/10] builtin/cat-file: rename variable that tracks usage
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 7, 2025, 20:25 UTC
- Message-ID
- <xmqqecy3n2h4.fsf@gitster.g>
- In-Reply-To
- <Z-0bwFewNxUM7HUe@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 5 quoted lines
>> > - const char * const usage[] = {
>> > + const char * const builtin_catfile_usage[] = {
>>
>> Nit: Style: we use a right pointer alignment, while it is not part of
>> your code change, would be nice to fix.Sorry, but I do not get the "right pointer alignment" here. There is a rule to say that the asterisk sticks to variable (and member in a struct/union) rather than to type, and since <type> comes before the <variable> being declared in C, it would be <type> *<variable>, but that is different from "write asterisk stuck to the right identifier".
Show 8 quoted lines
> Not in this case though: > > $ git grep 'const char \*const' | wc -l > 85 > $ git grep 'const char \* const' | wc -l > 180 > > It's mixed, but we do have more cases of the latter.
I think what you wrote is fine. Thanks.