Re: fatal from submodule status --recursive when used with grep -q

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matt Liberty <mliberty@xxxxxxxxxxxxxxxxx> writes:

[administrivia: you are not supposed to top-post on this list]

> On Thu, Sep 19, 2024 at 7:22 AM <phillip.wood123@xxxxxxxxx> 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.






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux