From: Patrick Steinhardt Date: Mon, 08 Dec 2025 18:27:13 GMT Subject: [PATCH 0/2] builtin/repack: avoid rewriting up-to-date MIDX Message-ID: <20251208-pks-skip-noop-rewrite-v1-0-430d52dba9f0@pks.im> Hi, this small patch series introduces logic to avoid rewriting the multi-pack index in case it's up-to-date already. This is especially relevant in the context of geometric repacking, where we may decide to not write any new packfiles, but we'd still rewrite the multi-pack index. This is a follow-up for the discussion that happened at [1]. Thanks! Patrick [1]: <20251025191550.GA279793@coredump.intra.peff.net> --- Patrick Steinhardt (2): midx: fix `BUG()` when getting preferred pack without a reverse index builtin/repack: don't regenerate MIDX unless needed midx.c | 2 +- pack-revindex.h | 3 +- repack-midx.c | 90 +++++++++++++++++++++++++++++++++++++++++++++ t/t5319-multi-pack-index.sh | 55 +++++++++++++++++++++++++++ t/t7703-repack-geometric.sh | 80 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 228 insertions(+), 2 deletions(-) --- base-commit: bdc5341ff65278a3cc80b2e8a02a2f02aa1fac06 change-id: 20251208-pks-skip-noop-rewrite-38d7f01c79c5