From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: Taylor Blau <me@ttaylorr.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: Fri, 12 Dec 2025 08:33:14 +0100 [thread overview]
Message-ID: <aTvFOlhtPHgWQC5L@pks.im> (raw)
In-Reply-To: <xmqqsedhe78q.fsf@gitster.g>
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!
Patrick
next prev parent reply other threads:[~2025-12-12 7:33 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 [this message]
2025-12-18 21:18 ` Taylor Blau
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=aTvFOlhtPHgWQC5L@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.com \
--cc=peff@peff.net \
/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).