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

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

 



The exit code matters if you do "set -euo pipefail".

Matt


On Thu, Sep 19, 2024 at 12:40 PM Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
>
> On Thu, Sep 19, 2024 at 3:10 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
> > Matt Liberty <mliberty@xxxxxxxxxxxxxxxxx> writes:
> > > 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.
>
> Regarding the exit code, it's not even clear how that factors into
> this discussion considering that, in the presented example,
> git-submodule is upstream of a pipe, thus its exit code is lost
> anyhow.





[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