Re: [PATCH] diff: handle negative status in diff_result_code()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 21, 2023, 18:39 UTC
- Message-ID
- <xmqqfs4cp7dj.fsf@gitster.g>
- In-Reply-To
- <20230821180943.GA2617193@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> That would make the code simpler. It does feel a bit like going in the > opposite direction of recent "pass errors up the stack rather than > dying" libification efforts. I think that's OK for the builtin_* helpers > in diff.c, which are just serving the diff porcelain. But things like > run_diff_files(), while pretty big operations, are something we might > call as small part of another operation (like git-describe).
True, for things in diff-lib.c we likely would want to go in the opposite "return an error to be handled by the caller" route.