Subject: Re: MIDX woes, was Re: [ANNOUNCE] Git v2.54.0-rc2

From: Junio C Hamano <[email-masked]>
Date: Thu, 16 Apr 2026 13:12:50 -0700

Jeff King <[email-masked]> writes:

> Yeah, I agree that re-wording would be a good idea here.

I actually no longer think so.

> I think this
> can happen post-release. We'd like for this to have happened long ago,
> but it didn't. Doing it in 2.54 versus 2.55 does not really matter, as:
>
>   1. We still have to worry about 2.53 and earlier anyway, so one
>      version is not much in the grand scheme of things.
>
>   2. For midx v2, 2.54 knows how to read it anyway, so is not affected
>      by the problem. ;)

I agree 100% with this.

Looking at the later part of load_multi_pack_index_one() function,
it is full of die() calls, not prepared to degrade gracefully at
all.

The reason why I do not think reword is worth doing is that as far
as this function (i.e., "Here is an MIDX file---please read it and
give me struct multi_pack_index back") is concerned, these error
returns are giving diagnosis on the nature of errors.  Sometimes we
cannot learn the length of the file, sometimes we find that the file
is unreasonably short, sometimes it is not sorted properly, etc.
None of the existing "error + cleanup" says "we are continuing
anyway" and that is good.  The decision to keep going without using
midx file (or not) belongs to the caller, so if we wanted to say
that, we should say so in the caller, not here.