From: Junio C Hamano <gitster@pobox.com>
To: Matt Liberty <mliberty@precisioninno.com>
Cc: phillip.wood@dunelm.org.uk, git@vger.kernel.org
Subject: Re: fatal from submodule status --recursive when used with grep -q
Date: Thu, 19 Sep 2024 12:09:19 -0700 [thread overview]
Message-ID: <xmqqsetv795s.fsf@gitster.g> (raw)
In-Reply-To: <CAKDm0rO6H4RTa5EXMrNvSy2swVegHveasY1koZXF5V7HvZzK0Q@mail.gmail.com> (Matt Liberty's message of "Thu, 19 Sep 2024 08:17:17 -0700")
Matt Liberty <mliberty@precisioninno.com> writes:
[administrivia: you are not supposed to top-post on this list]
> On Thu, Sep 19, 2024 at 7:22 AM <phillip.wood123@gmail.com> wrote:
>>
>> On 18/09/2024 15:28, Matt Liberty wrote:
>> > I'm not trying to capture the exit status of git but of grep. Compare
>> > it to "yes|grep -q y" which doesn't generate any error even though yes
>> > generates endless output.
>>
>> Sorry, I'd misunderstood your original message. So the problem is that
>> you want "git submodule status" to be quiet (i.e. not print an error
>> message) when it dies of SIGPIPE?
>
> Yes and also to have a 0 exit code. No error occurred from my perspective.
I am sympathetic to the line of reasoning, but I wouldn't go that
far.
Running "yes | less" and killing it with 'q' saying "ok I've seen
enough", and running "yes" and killing it with '^C' saying "ok I've
seen enough" are pretty much the same from the end-user perspective.
You told the command to go away, and the command complied. But I
haven't seen anybody complaining if they see a "Killed" message or
"echo $?" immediately after it says 130 for the latter.
next prev parent reply other threads:[~2024-09-19 19:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 15:08 fatal from submodule status --recursive when used with grep -q Matt Liberty
2024-09-18 10:05 ` Phillip Wood
2024-09-18 14:45 ` Matt Liberty
2024-09-19 1:16 ` Junio C Hamano
2024-09-19 13:23 ` Matt Liberty
[not found] ` <CAKDm0rMsXUpFSWRWkW0J0FUpEbot6wQqdzYTT5CLZ=3TGbV-OA@mail.gmail.com>
2024-09-19 14:22 ` phillip.wood123
2024-09-19 15:17 ` Matt Liberty
2024-09-19 19:09 ` Junio C Hamano [this message]
2024-09-19 19:40 ` Eric Sunshine
2024-09-19 20:10 ` Matt Liberty
2024-09-20 13:12 ` phillip.wood123
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=xmqqsetv795s.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mliberty@precisioninno.com \
--cc=phillip.wood@dunelm.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.