From: Junio C Hamano <gitster@pobox•com>
To: Eric Sunshine <sunshine@sunshineco•com>
Cc: "Carlo Marcelo Arenas Belón" <carenas@gmail•com>, git@vger•kernel.org
Subject: Re: [RFC PATCH] coccicheck: fail "make" when it fails
Date: Sat, 21 Jun 2025 21:18:41 -0700 [thread overview]
Message-ID: <xmqqa5608l3y.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cRtSzjA=P_-WhRw9rRmTmFMGibKuHYn_ZuN935fcffveg@mail.gmail.com> (Eric Sunshine's message of "Sat, 21 Jun 2025 04:09:40 -0400")
Eric Sunshine <sunshine@sunshineco•com> writes:
> On Sat, Jun 21, 2025 at 2:29 AM Carlo Marcelo Arenas Belón
> <carenas@gmail•com> wrote:
>> On Thu, Jun 19, 2025 at 08:35:35AM -0800, Junio C Hamano wrote:
>> > coccicheck: $(COCCICHECK_PATCHES_INTREE)
>> > + test $$(cat $(COCCICHECK_PATCHES_INTREE) | wc -c) = 0
>>
>> Definitely a nitpick, but I think using `-eq` instead of `=`
>> and might even come handy from a portability point of view.
>
> Junio has previously expressed[*] a preference for `=` over `-eq` in
> this sort of situation.
>
> [*]: https://lore.kernel.org/git/7v8v3m50ds.fsf@alter.siamese.dyndns.org/
Heh, you have an infinite more memory than I have ;-)
That one is 12 years ago or so, isn't it? Not that I changed my
stance.
Having said that, I suspect
! grep -q ^ $(COCCICHECK_PATCHES_INTREE)
might have been easier to understand. We do not want any file with
even a single line in it, and "grep -q" knows to short-circuit
(i.e. if the first file in the COCCICHECK_PATCHES_INTREE list is not
empty, it does not even bother to open the rest of the files).
next prev parent reply other threads:[~2025-06-22 4:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-19 15:35 [RFC PATCH] coccicheck: fail "make" when it fails Junio C Hamano
2025-06-21 5:16 ` Jeff King
2025-06-21 6:29 ` Carlo Marcelo Arenas Belón
2025-06-21 8:09 ` Eric Sunshine
2025-06-22 4:18 ` Junio C Hamano [this message]
2025-06-23 16:14 ` [PATCH v2] " 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=xmqqa5608l3y.fsf@gitster.g \
--to=gitster@pobox$(echo .)com \
--cc=carenas@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=sunshine@sunshineco$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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