Re: [PATCH 00/15] tests: don't ignore "git" exit codes
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 4, 2022, 02:44 UTC
- Message-ID
- <xmqqlexq4et6.fsf@gitster.g>
- In-Reply-To
- <220303.864k4f3uqe.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 8 quoted lines
> Yes, it returns the correct status code, but that doesn't help with
> (pseudo)code like:
>
> if (run_command("foo")) /* exits with e.g. 123 */
> die("oh no, foo failed"); /* exits with 128 */
>
> I should have said "code using run-command.c does not do that...",
> sorry.Yeah, but even if callers of run_command() can tell "foo" segfaulted, I do not think it is sensible to exit as if we segfaulted (or, we _could_ actually die by segfaulting ourselves, which is worse).