From: Taylor Blau <me@ttaylorr.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH v2 0/3] builtin/repack: avoid rewriting up-to-date MIDX
Date: Thu, 18 Dec 2025 16:18:48 -0500 [thread overview]
Message-ID: <aURvuLcIVpBSIhiE@nand.local> (raw)
In-Reply-To: <aTvFOlhtPHgWQC5L@pks.im>
On Fri, Dec 12, 2025 at 08:33:14AM +0100, Patrick Steinhardt wrote:
> 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
next prev parent reply other threads:[~2025-12-18 21:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 18:27 [PATCH 0/2] builtin/repack: avoid rewriting up-to-date MIDX Patrick Steinhardt
2025-12-08 18:27 ` [PATCH 1/2] midx: fix `BUG()` when getting preferred pack without a reverse index Patrick Steinhardt
2025-12-10 0:22 ` Taylor Blau
2025-12-10 9:40 ` Patrick Steinhardt
2025-12-18 21:13 ` Taylor Blau
2025-12-08 18:27 ` [PATCH 2/2] builtin/repack: don't regenerate MIDX unless needed Patrick Steinhardt
2025-12-10 2:48 ` Taylor Blau
2025-12-10 9:40 ` Patrick Steinhardt
2025-12-10 12:52 ` [PATCH v2 0/3] builtin/repack: avoid rewriting up-to-date MIDX Patrick Steinhardt
2025-12-10 12:52 ` [PATCH v2 1/3] midx: fix `BUG()` when getting preferred pack without a reverse index Patrick Steinhardt
2025-12-10 12:52 ` [PATCH v2 2/3] midx-write: extract function to test whether MIDX needs updating Patrick Steinhardt
2025-12-10 12:52 ` [PATCH v2 3/3] midx-write: skip rewriting MIDX with `--stdin-packs` unless needed Patrick Steinhardt
2025-12-11 8:46 ` [PATCH v2 0/3] builtin/repack: avoid rewriting up-to-date MIDX Junio C Hamano
2025-12-12 7:33 ` Patrick Steinhardt
2025-12-18 21:18 ` Taylor Blau [this message]
2025-12-19 6:25 ` Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aURvuLcIVpBSIhiE@nand.local \
--to=me@ttaylorr.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).