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

Re: [PATCH v2 0/3] builtin/repack: avoid rewriting up-to-date MIDX

From
Taylor Blau <me@ttaylorr.com>
Date
Dec 18, 2025, 21:18 UTC
Message-ID
<aURvuLcIVpBSIhiE@nand.local>
In-Reply-To
<aTvFOlhtPHgWQC5L@pks.im>
On Fri, Dec 12, 2025 at 08:33:14AM +0100, Patrick Steinhardt wrote:
Show 38 quoted lines
> On Thu, Dec 11, 2025 at 05:46:13PM +0900, Junio C Hamano wrote:
> > This and Taylor's incremental part 3.2 have a slight conflict in
> > that this topic factors away the logic to compute if we need
> > recomputing MIDX while the other one tweaks with yet another flag.
> >
> > My tentative resolution in 'seen' looks like the attached.  Sanity
> > checking is very much appreciated.
> >
> > Thanks.
> >
> > diff --cc midx-write.c
> > index ce459b02c3,f2dbacef4c..66c125ccb0
> > --- a/midx-write.c
> > +++ b/midx-write.c
> > @@@ -1014,73 -1131,30 +1131,89 @@@ static void clear_midx_files(struct odb
> >   	strbuf_release(&buf);
> >   }
> >
> >  +static bool midx_needs_update(struct multi_pack_index *midx, struct write_midx_context *ctx)
> >  +{
> >  +	struct strset packs = STRSET_INIT;
> >  +	struct strbuf buf = STRBUF_INIT;
> >  +	bool needed = true;
> >  +
> >  +	/*
> >  +	 * Ignore incremental updates for now. The assumption is that any
> >  +	 * incremental update would be either empty (in which case we will bail
> >  +	 * out later) or it would actually cover at least one new pack.
> >  +	 */
> > - 	if (ctx->incremental)
> > ++	if (ctx->incremental || ctx->compact)
> >  +		goto out;
>
> So this here is essentially the change you had to port over, which looks
> about right to me. The comment is becoming somewhat stale due to the
> change, but I don't think that's much of an issue for now.
>
> Thanks!

Thanks, both. The new version of these patches looks good to me. FYI I am going out of office beginning tomorrow through the end of the year. In case it's easier to queue, it's fine to drop my 3.2 patches from 'seen' and take Patrick's v2 as-is.

I plan on sending a new round of 3.2 in the first week of the new year and don't mind it being dropped in the meantime, especially if it makes things easier for the maintainer.

Enjoy the holidays everyone!

Thanks, Taylor

Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 15 of 16 in “builtin/repack: avoid rewriting up-to-date MIDX”
  1. 0/2 builtin/repack: avoid rewriting up-to-date MIDXPatrick Steinhardt, Dec 8, 2025
  2. 1/2 midx: fix `BUG()` when getting preferred pack without a reverse indexPatrick Steinhardt, Dec 8, 2025
  3. Taylor BlauDec 10, 2025
  4. Patrick SteinhardtDec 10, 2025
  5. Taylor BlauDec 18, 2025
  6. 2/2 builtin/repack: don't regenerate MIDX unless neededPatrick Steinhardt, Dec 8, 2025
  7. Taylor BlauDec 10, 2025
  8. Patrick SteinhardtDec 10, 2025
  9. 0/3 builtin/repack: avoid rewriting up-to-date MIDXPatrick Steinhardt, Dec 10, 2025
  10. 1/3 midx: fix `BUG()` when getting preferred pack without a reverse indexPatrick Steinhardt, Dec 10, 2025
  11. 2/3 midx-write: extract function to test whether MIDX needs updatingPatrick Steinhardt, Dec 10, 2025
  12. 3/3 midx-write: skip rewriting MIDX with `--stdin-packs` unless neededPatrick Steinhardt, Dec 10, 2025
  13. Junio C HamanoDec 11, 2025
  14. Patrick SteinhardtDec 12, 2025
  15. Taylor BlauDec 18, 2025
  16. Patrick SteinhardtDec 19, 2025

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.