Re: [PATCH 06/19] reftable/record: don't `BUG()` in `reftable_record_cmp()`
On 25/01/27 02:04PM, Patrick Steinhardt wrote:
> The refatble library aborts with a bug in case `reftable_record_cmp()`
Show 10 quoted lines
> is invoked with two records of differing types. This would cause the
> program to die without the caller being able to handle the error, which
> is not something we want in the context of library code. And it ties us
> to the Git codebase.
>
> Refactor the code such that `reftable_record_cmp()` returns an error
> code separate from the actual comparison result. This requires us to
> also adapt some callers up the callchain in a similar fashion.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>