Re: [PATCH v2 1/2] for-each-repo: optionally keep going on an error
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 22, 2024, 21:39 UTC
- Message-ID
- <xmqqr0ext6us.fsf@gitster.g>
- In-Reply-To
- <20240419175621.GB14309@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> run_command() may also return the exit code of the program run. So > imagine a setup like: > > git init > git config alias.foo '!exit 123' > git config repo.paths "$PWD" > git for-each-repo --config=repo.paths foo > echo $? > > Before the patch we see "123" and after we see "1".
True, or when the process receives a signal, etc. With this change, we do lose information.
> I do agree that passing -1 to exit is bad; we maybe should normalize to > 127 for not found, though I think we could also see -1 for system errors > like fork() failing.
True, but I think that is a separate issue.
So, let's have a (hopefully final reroll to fix the error code when stopping at the first error and merge it to 'next'?
Thanks.