git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] midx: state what failed correctly

From
Taylor Blau <me@ttaylorr.com>
Date
Apr 16, 2026, 21:17 UTC
Message-ID
<aeFR8qOTBGA922eY@nand.local>
In-Reply-To
<xmqqik9qzlv0.fsf@gitster.g>
On Thu, Apr 16, 2026 at 01:33:23PM -0700, Junio C Hamano wrote:
> ---
>  midx.c | 26 +++++++++++++++++---------
>  1 file changed, 17 insertions(+), 9 deletions(-)

The approach here seems very reasonable to me, and the implementation matches it faithfully. I think that this makes sense to pick up, though I suspect that there are other quality-of-life fixes that we could write on top, e.g., to suppress duplicate "failed to load"-like messages, which I recall having to deal with in the past.

The patch looks good to me, with one small nitpick:
Show 6 quoted lines
> @@ -339,7 +347,7 @@ static struct multi_pack_index *load_midx_chain_fd_st(struct odb_source *source,
>  		strbuf_reset(&buf);
>  		get_split_midx_filename_ext(source, &buf,
>  					    layer.hash, MIDX_EXT_MIDX);
> -		m = load_multi_pack_index_one(source, buf.buf);
> +		m = load_multi_pack_index_one(source, buf.buf, 0);
Here you specify "missing_ok" as "0", but...
Show 6 quoted lines
> @@ -387,7 +395,7 @@ struct multi_pack_index *load_multi_pack_index(struct odb_source *source)
>
>  	get_midx_filename(source, &midx_name);
>
> -	m = load_multi_pack_index_one(source, midx_name.buf);
> +	m = load_multi_pack_index_one(source, midx_name.buf, true);

Here you specify it as "true". Given the above I would have expected "1" here, but I think that this hunk is preferable, and the earlier one should use "false" instead.

Thanks, Taylor

Previous: Junio C Hamano
Message 2 of 2 in “midx: state what failed correctly”
  1. midx: state what failed correctlyJunio C Hamano, Apr 16, 2026
  2. Taylor BlauApr 16, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.