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

[PATCH 06/16] midx: support custom `--base` for incremental MIDX writes

From
Taylor Blau <me@ttaylorr.com>
Date
Mar 29, 2026, 21:41 UTC
Message-ID
<6b42d284b79a25e97d506e22c709e4dbe6fddd58.1774820449.git.me@ttaylorr.com>
In-Reply-To
<cover.1774820449.git.me@ttaylorr.com>

Both `compact` and `write --incremental` fix the base of the resulting MIDX layer: `compact` always places the compacted result on top of "from's" immediate parent in the chain, and `write --incremental` always appends a new layer to the existing tip. In both cases the base is not configurable.

Future callers need additional flexibility. For instance, the incremental MIDX-based repacking code may wish to write a layer based on some intermediate ancestor rather than the current tip, or produce a root layer when replacing the bottommost entries in the chain.

Introduce a new `--base` option for both subcommands to specify the checksum of the MIDX layer to use as the base. The given checksum must refer to a valid layer in the MIDX chain that is an ancestor of the topmost layer being written or compacted.

The special value "none" is accepted to produce a root layer with no parent. This will be needed when the incremental repacking machinery determines that the bottommost layers of the chain should be replaced.

If no `--base` is given, behavior is unchanged: `compact` uses "from's" immediate parent in the chain, and `write` appends to the existing tip.

For the `write` subcommand, `--base` requires `--checksum-only`. A plain `write --incremental` appends a new layer to the live chain tip with no mechanism to atomically replace it; overriding the base would produce a layer that does not extend the tip, breaking chain invariants. With `--checksum-only` the chain is left unmodified and the caller is responsible for assembling a valid chain.

For `compact`, no such restriction applies. The compaction operation atomically replaces the compacted range in the chain file, so writing the result on top of any valid ancestor preserves chain invariants.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
---
 Documentation/git-multi-pack-index.adoc | 17 +++++-
 builtin/multi-pack-index.c              | 24 ++++++--
 midx-write.c                            | 34 ++++++++++-
 midx.h                                  |  5 +-
 t/t5334-incremental-multi-pack-index.sh | 30 ++++++++++
 t/t5335-compact-multi-pack-index.sh     | 77 +++++++++++++++++++++++++
 6 files changed, 178 insertions(+), 9 deletions(-)
diff --git a/Documentation/git-multi-pack-index.adoc b/Documentation/git-multi-pack-index.adoc
index 657e0639f6a..635105ad801 100644
--- a/Documentation/git-multi-pack-index.adoc
+++ b/Documentation/git-multi-pack-index.adoc
@@ -12,8 +12,10 @@ SYNOPSIS
 'git multi-pack-index' [<options>] write [--preferred-pack=<pack>]
 		         [--[no-]bitmap] [--[no-]incremental] [--[no-]stdin-packs]
 		         [--refs-snapshot=<path>] [--[no-]checksum-only]
+			 [--base=<checksum>]
 'git multi-pack-index' [<options>] compact [--[no-]incremental]
-		         [--[no-]bitmap] [--[no-]checksum-only] <from> <to>
+		         [--[no-]bitmap] [--base=<checksum>] [--[no-]checksum-only]
+			 <from> <to>
 'git multi-pack-index' [<options>] verify
 'git multi-pack-index' [<options>] expire
 'git multi-pack-index' [<options>] repack [--batch-size=<size>]
@@ -83,6 +85,13 @@ marker).
 		and packs not present in an existing MIDX layer.
 		Migrates non-incremental MIDXs to incremental ones when
 		necessary.
+
+	--base=<checksum>::
+		Specify the checksum of an existing MIDX layer to use
+		as the base when writing a new incremental layer.
+		The special value `none` indicates that the new layer
+		should have no base (i.e., it becomes a root layer).
+		Requires `--checksum-only`.
 --
 
 compact::
@@ -97,6 +106,12 @@ compact::
 
 	--[no-]bitmap::
 		Control whether or not a multi-pack bitmap is written.
+
+	--base=<checksum>::
+		Specify the checksum of an existing MIDX layer to use
+		as the base for the compacted result, instead of using
+		the immediate parent of `<from>`. The special value
+		`none` indicates that the result should have no base.
 --
 
 verify::
diff --git a/builtin/multi-pack-index.c b/builtin/multi-pack-index.c
index 17ab1525454..3a12baacb56 100644
--- a/builtin/multi-pack-index.c
+++ b/builtin/multi-pack-index.c
@@ -16,11 +16,13 @@
 #define BUILTIN_MIDX_WRITE_USAGE \
 	N_("git multi-pack-index [<options>] write [--preferred-pack=<pack>]\n" \
 	   "  [--[no-]bitmap] [--[no-]incremental] [--[no-]stdin-packs]\n" \
-	   "  [--refs-snapshot=<path>] [--[no-]checksum-only]")
+	   "  [--refs-snapshot=<path>] [--[no-]checksum-only]\n" \
+	   "  [--base=<checksum>]")
 
 #define BUILTIN_MIDX_COMPACT_USAGE \
 	N_("git multi-pack-index [<options>] compact [--[no-]incremental]\n" \
-	   "  [--[no-]bitmap] [--[no-]checksum-only] <from> <to>")
+	   "  [--[no-]bitmap] [--base=<checksum>] [--[no-]checksum-only]\n" \
+	   "  <from> <to>")
 
 #define BUILTIN_MIDX_VERIFY_USAGE \
 	N_("git multi-pack-index [<options>] verify")
@@ -63,6 +65,7 @@ static char const * const builtin_multi_pack_index_usage[] = {
 static struct opts_multi_pack_index {
 	char *object_dir;
 	const char *preferred_pack;
+	const char *incremental_base;
 	char *refs_snapshot;
 	unsigned long batch_size;
 	unsigned flags;
@@ -151,6 +154,8 @@ static int cmd_multi_pack_index_write(int argc, const char **argv,
 			   N_("pack for reuse when computing a multi-pack bitmap")),
 		OPT_BIT(0, "bitmap", &opts.flags, N_("write multi-pack bitmap"),
 			MIDX_WRITE_BITMAP | MIDX_WRITE_REV_INDEX),
+		OPT_STRING(0, "base", &opts.incremental_base, N_("checksum"),
+			   N_("base MIDX for incremental writes")),
 		OPT_BIT(0, "incremental", &opts.flags,
 			N_("write a new incremental MIDX"), MIDX_WRITE_INCREMENTAL),
 		OPT_BIT(0, "checksum-only", &opts.flags,
@@ -190,6 +195,13 @@ static int cmd_multi_pack_index_write(int argc, const char **argv,
 				   options);
 	}
 
+	if (opts.incremental_base &&
+	    !(opts.flags & MIDX_WRITE_CHECKSUM_ONLY)) {
+		error(_("cannot use --base without --checksum-only"));
+		usage_with_options(builtin_multi_pack_index_write_usage,
+				   options);
+	}
+
 	source = handle_object_dir_option(repo);
 
 	FREE_AND_NULL(options);
@@ -201,7 +213,8 @@ static int cmd_multi_pack_index_write(int argc, const char **argv,
 
 		ret = write_midx_file_only(source, &packs,
 					   opts.preferred_pack,
-					   opts.refs_snapshot, opts.flags);
+					   opts.refs_snapshot,
+					   opts.incremental_base, opts.flags);
 
 		string_list_clear(&packs, 0);
 		free(opts.refs_snapshot);
@@ -229,6 +242,8 @@ static int cmd_multi_pack_index_compact(int argc, const char **argv,
 
 	struct option *options;
 	static struct option builtin_multi_pack_index_compact_options[] = {
+		OPT_STRING(0, "base", &opts.incremental_base, N_("checksum"),
+			   N_("base MIDX for incremental writes")),
 		OPT_BIT(0, "bitmap", &opts.flags, N_("write multi-pack bitmap"),
 			MIDX_WRITE_BITMAP | MIDX_WRITE_REV_INDEX),
 		OPT_BIT(0, "incremental", &opts.flags,
@@ -290,7 +305,8 @@ static int cmd_multi_pack_index_compact(int argc, const char **argv,
 			die(_("MIDX %s must be an ancestor of %s"), argv[0], argv[1]);
 	}
 
-	ret = write_midx_file_compact(source, from_midx, to_midx, opts.flags);
+	ret = write_midx_file_compact(source, from_midx, to_midx,
+				      opts.incremental_base, opts.flags);
 
 	return ret;
 }
diff --git a/midx-write.c b/midx-write.c
index 2c6905173ba..9298a5140fd 100644
--- a/midx-write.c
+++ b/midx-write.c
@@ -1247,6 +1247,7 @@ struct write_midx_opts {
 
 	const char *preferred_pack_name;
 	const char *refs_snapshot;
+	const char *incremental_base;
 	unsigned flags;
 };
 
@@ -1329,11 +1330,32 @@ static int write_midx_internal(struct write_midx_opts *opts)
 
 	/*
 	 * If compacting MIDX layer(s) in the range [from, to], then the
-	 * compacted MIDX will share the same base MIDX as 'from'.
+	 * compacted MIDX will share the same base MIDX as 'from',
+	 * unless a custom --base is specified (see below).
 	 */
 	if (ctx.compact)
 		ctx.base_midx = ctx.compact_from->base_midx;
 
+	if (opts->incremental_base) {
+		if (!strcmp(opts->incremental_base, "none")) {
+			ctx.base_midx = NULL;
+		} else {
+			while (ctx.base_midx) {
+				const char *cmp = midx_get_checksum_hex(ctx.base_midx);
+				if (!strcmp(opts->incremental_base, cmp))
+					break;
+
+				ctx.base_midx = ctx.base_midx->base_midx;
+			}
+
+			if (!ctx.base_midx) {
+				error(_("could not find base MIDX '%s'"),
+				      opts->incremental_base);
+				goto cleanup;
+			}
+		}
+	}
+
 	ctx.nr = 0;
 	ctx.alloc = ctx.m ? ctx.m->num_packs + ctx.m->num_packs_in_base : 16;
 	ctx.info = NULL;
@@ -1846,7 +1868,8 @@ static int write_midx_internal(struct write_midx_opts *opts)
 
 int write_midx_file(struct odb_source *source,
 		    const char *preferred_pack_name,
-		    const char *refs_snapshot, unsigned flags)
+		    const char *refs_snapshot,
+		    unsigned flags)
 {
 	struct write_midx_opts opts = {
 		.source = source,
@@ -1861,13 +1884,16 @@ int write_midx_file(struct odb_source *source,
 int write_midx_file_only(struct odb_source *source,
 			 struct string_list *packs_to_include,
 			 const char *preferred_pack_name,
-			 const char *refs_snapshot, unsigned flags)
+			 const char *refs_snapshot,
+			 const char *incremental_base,
+			 unsigned flags)
 {
 	struct write_midx_opts opts = {
 		.source = source,
 		.packs_to_include = packs_to_include,
 		.preferred_pack_name = preferred_pack_name,
 		.refs_snapshot = refs_snapshot,
+		.incremental_base = incremental_base,
 		.flags = flags,
 	};
 
@@ -1877,12 +1903,14 @@ int write_midx_file_only(struct odb_source *source,
 int write_midx_file_compact(struct odb_source *source,
 			    struct multi_pack_index *from,
 			    struct multi_pack_index *to,
+			    const char *incremental_base,
 			    unsigned flags)
 {
 	struct write_midx_opts opts = {
 		.source = source,
 		.compact_from = from,
 		.compact_to = to,
+		.incremental_base = incremental_base,
 		.flags = flags | MIDX_WRITE_COMPACT,
 	};
 
diff --git a/midx.h b/midx.h
index 9f1acd7ace4..e4a75ff2bef 100644
--- a/midx.h
+++ b/midx.h
@@ -132,10 +132,13 @@ int write_midx_file(struct odb_source *source,
 int write_midx_file_only(struct odb_source *source,
 			 struct string_list *packs_to_include,
 			 const char *preferred_pack_name,
-			 const char *refs_snapshot, unsigned flags);
+			 const char *refs_snapshot,
+			 const char *incremental_base,
+			 unsigned flags);
 int write_midx_file_compact(struct odb_source *source,
 			    struct multi_pack_index *from,
 			    struct multi_pack_index *to,
+			    const char *incremental_base,
 			    unsigned flags);
 void clear_midx_file(struct repository *r);
 int verify_midx_file(struct odb_source *source, unsigned flags);
diff --git a/t/t5334-incremental-multi-pack-index.sh b/t/t5334-incremental-multi-pack-index.sh
index ac249365f2b..7733cafb647 100755
--- a/t/t5334-incremental-multi-pack-index.sh
+++ b/t/t5334-incremental-multi-pack-index.sh
@@ -113,6 +113,36 @@ test_expect_success 'write non-incremental MIDX layer with --checksum-only' '
 	test_grep "cannot use --checksum-only without --incremental" err
 '
 
+test_expect_success 'write MIDX layer with --base without --checksum-only' '
+	test_must_fail git multi-pack-index write --bitmap --incremental \
+		--base=none 2>err &&
+	test_grep "cannot use --base without --checksum-only" err
+'
+
+test_expect_success 'write MIDX layer with --base=none and --checksum-only' '
+	test_commit base-none &&
+	git repack -d &&
+
+	cp "$midx_chain" "$midx_chain.bak" &&
+	layer="$(git multi-pack-index write --bitmap --incremental \
+		--checksum-only --base=none)" &&
+
+	test_cmp "$midx_chain.bak" "$midx_chain" &&
+	test_path_is_file "$midxdir/multi-pack-index-$layer.midx"
+'
+
+test_expect_success 'write MIDX layer with --base=<hash> and --checksum-only' '
+	test_commit base-hash &&
+	git repack -d &&
+
+	cp "$midx_chain" "$midx_chain.bak" &&
+	layer="$(git multi-pack-index write --bitmap --incremental \
+		--checksum-only --base="$(nth_line 1 "$midx_chain")")" &&
+
+	test_cmp "$midx_chain.bak" "$midx_chain" &&
+	test_path_is_file "$midxdir/multi-pack-index-$layer.midx"
+'
+
 for reuse in false single multi
 do
 	test_expect_success "full clone (pack.allowPackReuse=$reuse)" '
diff --git a/t/t5335-compact-multi-pack-index.sh b/t/t5335-compact-multi-pack-index.sh
index 3ad910a9d1c..d8e1b03669a 100755
--- a/t/t5335-compact-multi-pack-index.sh
+++ b/t/t5335-compact-multi-pack-index.sh
@@ -304,6 +304,7 @@ test_expect_success 'MIDX compaction with --checksum-only' '
 
 		layer="$(git multi-pack-index compact --incremental \
 			--checksum-only \
+			--base="$(nth_line 1 "$midx_chain")" \
 			"$(nth_line 2 "$midx_chain")" \
 			"$(nth_line 3 "$midx_chain")")" &&
 
@@ -326,4 +327,80 @@ test_expect_success 'MIDX compaction with --checksum-only' '
 	)
 '
 
+test_expect_success 'MIDX compaction with --base' '
+	git init midx-compact-with--base &&
+	(
+		cd midx-compact-with--base &&
+
+		git config maintenance.auto false &&
+
+		write_packs A B C D &&
+
+		test_line_count = 4 "$midx_chain" &&
+
+		cp "$midx_chain" "$midx_chain.bak" &&
+
+		git multi-pack-index compact --incremental \
+			--base="$(nth_line 1 "$midx_chain")" \
+			"$(nth_line 3 "$midx_chain")" \
+			"$(nth_line 4 "$midx_chain")" &&
+		test_line_count = 2 $midx_chain &&
+
+		nth_line 1 "$midx_chain.bak" >expect &&
+		nth_line 1 "$midx_chain" >actual &&
+
+		test_cmp expect actual
+	)
+'
+
+test_expect_success 'MIDX compaction with --base=none' '
+	git init midx-compact-base-none &&
+	(
+		cd midx-compact-base-none &&
+
+		git config maintenance.auto false &&
+
+		write_packs A B C D &&
+
+		test_line_count = 4 $midx_chain &&
+
+		cp "$midx_chain" "$midx_chain".bak &&
+
+		# Compact the two bottommost layers (A and B) into a new
+		# root layer with no parent.
+		git multi-pack-index compact --incremental \
+			--base=none \
+			"$(nth_line 1 "$midx_chain")" \
+			"$(nth_line 2 "$midx_chain")" &&
+
+		test_line_count = 3 $midx_chain &&
+
+		# The upper layers (C and D) should be preserved
+		# unchanged.
+		nth_line 3 "$midx_chain.bak" >expect &&
+		nth_line 4 "$midx_chain.bak" >>expect &&
+		nth_line 2 "$midx_chain" >actual &&
+		nth_line 3 "$midx_chain" >>actual &&
+
+		test_cmp expect actual
+	)
+'
+
+test_expect_success 'MIDX compaction with bogus --base checksum' '
+	git init midx-compact-bogus-base &&
+	(
+		cd midx-compact-bogus-base &&
+
+		git config maintenance.auto false &&
+
+		write_packs A B C &&
+
+		test_must_fail git multi-pack-index compact --incremental \
+			--base=deadbeef \
+			"$(nth_line 2 "$midx_chain")" \
+			"$(nth_line 3 "$midx_chain")" 2>err &&
+		test_grep "could not find base MIDX" err
+	)
+'
+
 test_done
-- 
2.53.0.729.g817728289e1.dirty
Previous: Taylor BlauNext: Jeff King
Message 20 of 113 in “repack: incremental MIDX/bitmap-based repacking”
  1. 00/16 repack: incremental MIDX/bitmap-based repackingTaylor Blau, Mar 29, 2026
  2. 01/16 midx-write: handle noop writes when converting incremental chainsTaylor Blau, Mar 29, 2026
  3. Jeff KingMar 30, 2026
  4. Taylor BlauMar 31, 2026
  5. 02/16 midx: use `string_list` for retained MIDX filesTaylor Blau, Mar 29, 2026
  6. Jeff KingMar 30, 2026
  7. Taylor BlauMar 31, 2026
  8. 03/16 strvec: introduce `strvec_init_alloc()`Taylor Blau, Mar 29, 2026
  9. Jeff KingMar 30, 2026
  10. 04/16 midx: use `strvec` for `keep_hashes`Taylor Blau, Mar 29, 2026
  11. Jeff KingMar 30, 2026
  12. Taylor BlauMar 31, 2026
  13. Taylor BlauMar 31, 2026
  14. Jeff KingMar 31, 2026
  15. Taylor BlauApr 1, 2026
  16. Jeff KingApr 1, 2026
  17. 05/16 midx: introduce `--checksum-only` for incremental MIDX writesTaylor Blau, Mar 29, 2026
  18. Jeff KingMar 30, 2026
  19. Taylor BlauApr 2, 2026
  20. 06/16 midx: support custom `--base` for incremental MIDX writesTaylor Blau, Mar 29, 2026
  21. Jeff KingApr 7, 2026
  22. Taylor BlauApr 14, 2026
  23. 07/16 repack: track the ODB source via existing_packsTaylor Blau, Mar 29, 2026
  24. Jeff KingApr 7, 2026
  25. Taylor BlauApr 14, 2026
  26. 08/16 midx: expose `midx_layer_contains_pack()`Taylor Blau, Mar 29, 2026
  27. Jeff KingApr 7, 2026
  28. 09/16 repack-midx: factor out `repack_prepare_midx_command()`Taylor Blau, Mar 29, 2026
  29. 10/16 repack-midx: extract `repack_fill_midx_stdin_packs()`Taylor Blau, Mar 29, 2026
  30. Jeff KingApr 7, 2026
  31. 11/16 repack-geometry: prepare for incremental MIDX repackingTaylor Blau, Mar 29, 2026
  32. Jeff KingApr 7, 2026
  33. Elijah NewrenApr 16, 2026
  34. Taylor BlauApr 21, 2026
  35. 12/16 builtin/repack.c: convert `--write-midx` to an `OPT_CALLBACK`Taylor Blau, Mar 29, 2026
  36. Jeff KingApr 7, 2026
  37. 13/16 packfile: ensure `close_pack_revindex()` frees in-memory revindexTaylor Blau, Mar 29, 2026
  38. Jeff KingApr 7, 2026
  39. 14/16 repack: implement incremental MIDX repackingTaylor Blau, Mar 29, 2026
  40. Elijah NewrenApr 16, 2026
  41. Taylor BlauApr 21, 2026
  42. 15/16 repack: introduce `--write-midx=incremental`Taylor Blau, Mar 29, 2026
  43. Elijah NewrenApr 16, 2026
  44. Taylor BlauApr 21, 2026
  45. 16/16 repack: allow `--write-midx=incremental` without `--geometric`Taylor Blau, Mar 29, 2026
  46. Taylor BlauApr 14, 2026
  47. 00/16 repack: incremental MIDX/bitmap-based repackingTaylor Blau, Apr 21, 2026
  48. 01/16 midx-write: handle noop writes when converting incremental chainsTaylor Blau, Apr 21, 2026
  49. 02/16 midx: use `strset` for retained MIDX filesTaylor Blau, Apr 21, 2026
  50. 03/16 midx: build `keep_hashes` array in orderTaylor Blau, Apr 21, 2026
  51. 04/16 midx: use `strvec` for `keep_hashes`Taylor Blau, Apr 21, 2026
  52. 05/16 midx: introduce `--no-write-chain-file` for incremental MIDX writesTaylor Blau, Apr 21, 2026
  53. 06/16 midx: support custom `--base` for incremental MIDX writesTaylor Blau, Apr 21, 2026
  54. 07/16 repack: track the ODB source via existing_packsTaylor Blau, Apr 21, 2026
  55. 08/16 midx: expose `midx_layer_contains_pack()`Taylor Blau, Apr 21, 2026
  56. 09/16 repack-midx: factor out `repack_prepare_midx_command()`Taylor Blau, Apr 21, 2026
  57. 10/16 repack-midx: extract `repack_fill_midx_stdin_packs()`Taylor Blau, Apr 21, 2026
  58. Jeff KingApr 29, 2026
  59. Taylor BlauApr 29, 2026
  60. 11/16 repack-geometry: prepare for incremental MIDX repackingTaylor Blau, Apr 21, 2026
  61. 12/16 builtin/repack.c: convert `--write-midx` to an `OPT_CALLBACK`Taylor Blau, Apr 21, 2026
  62. 13/16 packfile: ensure `close_pack_revindex()` frees in-memory revindexTaylor Blau, Apr 21, 2026
  63. 14/16 repack: implement incremental MIDX repackingTaylor Blau, Apr 21, 2026
  64. Jeff KingApr 29, 2026
  65. Taylor BlauApr 29, 2026
  66. Jeff KingApr 29, 2026
  67. Taylor BlauApr 29, 2026
  68. 15/16 repack: introduce `--write-midx=incremental`Taylor Blau, Apr 21, 2026
  69. Taylor BlauApr 21, 2026
  70. 16/16 repack: allow `--write-midx=incremental` without `--geometric`Taylor Blau, Apr 21, 2026
  71. Elijah NewrenApr 22, 2026
  72. Jeff KingApr 29, 2026
  73. 00/16 repack: incremental MIDX/bitmap-based repackingTaylor Blau, Apr 30, 2026
  74. 01/16 midx-write: handle noop writes when converting incremental chainsTaylor Blau, Apr 30, 2026
  75. 02/16 midx: use `strset` for retained MIDX filesTaylor Blau, Apr 30, 2026
  76. 03/16 midx: build `keep_hashes` array in orderTaylor Blau, Apr 30, 2026
  77. 04/16 midx: use `strvec` for `keep_hashes`Taylor Blau, Apr 30, 2026
  78. 05/16 midx: introduce `--no-write-chain-file` for incremental MIDX writesTaylor Blau, Apr 30, 2026
  79. 06/16 midx: support custom `--base` for incremental MIDX writesTaylor Blau, Apr 30, 2026
  80. 07/16 repack: track the ODB source via existing_packsTaylor Blau, Apr 30, 2026
  81. 08/16 midx: expose `midx_layer_contains_pack()`Taylor Blau, Apr 30, 2026
  82. 09/16 repack-midx: factor out `repack_prepare_midx_command()`Taylor Blau, Apr 30, 2026
  83. SZEDER GáborMay 13, 2026
  84. 10/16 repack-midx: extract `repack_fill_midx_stdin_packs()`Taylor Blau, Apr 30, 2026
  85. 11/16 repack-geometry: prepare for incremental MIDX repackingTaylor Blau, Apr 30, 2026
  86. 12/16 builtin/repack.c: convert `--write-midx` to an `OPT_CALLBACK`Taylor Blau, Apr 30, 2026
  87. 13/16 packfile: ensure `close_pack_revindex()` frees in-memory revindexTaylor Blau, Apr 30, 2026
  88. 14/16 repack: implement incremental MIDX repackingTaylor Blau, Apr 30, 2026
  89. 15/16 repack: introduce `--write-midx=incremental`Taylor Blau, Apr 30, 2026
  90. Jeff KingMay 13, 2026
  91. 16/16 repack: allow `--write-midx=incremental` without `--geometric`Taylor Blau, Apr 30, 2026
  92. Jeff KingMay 1, 2026
  93. 00/16 repack: incremental MIDX/bitmap-based repackingTaylor Blau, May 19, 2026
  94. 01/16 midx-write: handle noop writes when converting incremental chainsTaylor Blau, May 19, 2026
  95. 02/16 midx: use `strset` for retained MIDX filesTaylor Blau, May 19, 2026
  96. 03/16 midx: build `keep_hashes` array in orderTaylor Blau, May 19, 2026
  97. 04/16 midx: use `strvec` for `keep_hashes`Taylor Blau, May 19, 2026
  98. 05/16 midx: introduce `--no-write-chain-file` for incremental MIDX writesTaylor Blau, May 19, 2026
  99. 06/16 midx: support custom `--base` for incremental MIDX writesTaylor Blau, May 19, 2026
  100. SZEDER GáborJun 12, 2026
  101. Junio C HamanoJun 12, 2026
  102. Taylor BlauJun 12, 2026
  103. Taylor BlauJun 12, 2026
  104. 07/16 repack: track the ODB source via existing_packsTaylor Blau, May 19, 2026
  105. 08/16 midx: expose `midx_layer_contains_pack()`Taylor Blau, May 19, 2026
  106. 09/16 repack-midx: factor out `repack_prepare_midx_command()`Taylor Blau, May 19, 2026
  107. 10/16 repack-midx: extract `repack_fill_midx_stdin_packs()`Taylor Blau, May 19, 2026
  108. 11/16 repack-geometry: prepare for incremental MIDX repackingTaylor Blau, May 19, 2026
  109. 12/16 builtin/repack.c: convert `--write-midx` to an `OPT_CALLBACK`Taylor Blau, May 19, 2026
  110. 13/16 packfile: ensure `close_pack_revindex()` frees in-memory revindexTaylor Blau, May 19, 2026
  111. 14/16 repack: implement incremental MIDX repackingTaylor Blau, May 19, 2026
  112. 15/16 repack: introduce `--write-midx=incremental`Taylor Blau, May 19, 2026
  113. 16/16 repack: allow `--write-midx=incremental` without `--geometric`Taylor Blau, May 19, 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.