Expand description
Multi-pack-index (MIDX) read and write.
Structs§
- Midx
Btmp Pack Range - One pack’s slice of the MIDX pseudo-bitmap namespace (
BTMPchunk). - Midx
Object Ref - A single MIDX-referenced object together with the pack it is attributed to.
- Midx
Reuse Tables - OID rows from the active multi-pack-index, plus reverse-index order for pack-reuse bitmap bits.
- Write
Multi Pack Index Options - Options for writing a multi-pack index (extension of the simple writer).
- Write
Multi Pack Index Result - Result of
write_multi_pack_index_with_options.
Enums§
- Compact
Error - Failure modes of
compact_multi_pack_index, each mapping to one of git’s user-facing diagnostics incmd_multi_pack_index_compact. - Midx
Bitmap Write Outcome - Outcome of an optional MIDX reachability bitmap write.
Functions§
- cached_
tip_ midx_ path - Whether a tip MIDX file exists under
pack_dir(live filesystem probe). - clear_
pack_ midx_ state - Build
objects/pack/multi-pack-indexfor all pack indexes inpack_dir. - compact_
multi_ pack_ index git multi-pack-index compact <from> <to>: merge the inclusive chain range[from..to](oldest→newest, matching git’sfrom=argv[0]/to=argv[1]) into a single new incremental layer, preserving pack order, and rewrite the chain as[layers before from] + [compacted layer] + [layers after to].- evict_
midx_ read_ cache_ for_ pack_ dir - Drop cached MIDX bytes and tip resolution after pack-directory changes.
- format_
midx_ bitmapped_ packs - Format
test-tool read-midx --bitmapoutput for the active MIDX: per pack, a line with<pack>.pack, thenbitmap_pos:andbitmap_nr:. Returns an error whose message isMIDX does not contain the BTMP chunkwhen the MIDX has noBTMPchunk (mirrorsnth_bitmapped_packin git/midx.c). - format_
midx_ dump format_midx_dumpfunction.- format_
midx_ dump_ layer - Like
format_midx_dumpbut reads a specific layer by checksum (chain layer or root MIDX). Used bytest-tool read-midx <object-dir> <checksum>. - format_
midx_ show_ objects - Human-readable dump of the MIDX (matches
test-tool read-midxlayout closely enough for grep-based tests). Emit one line per MIDX object:{oid} {offset}\t{pack-idx-name}(matches Gittest-read-midx.c). - format_
midx_ show_ objects_ layer - Like
format_midx_show_objectsbut reads a specific layer by checksum. - load_
midx_ reuse_ tables - Load OID / object-offset / reverse-index tables from the tip MIDX (root or chain tip).
- load_
midx_ reuse_ tables_ from_ path - Load reuse tables from one on-disk MIDX layer (
multi-pack-indexormulti-pack-index.d/…midx). - midx_
checksum_ hex - Trailing 40-character SHA-1 hex of the active MIDX (root or chain tip).
- midx_
lookup_ pack_ and_ offset - Look up which pack and in-pack offset holds
oidaccording to the active MIDX. - midx_
lookup_ pack_ and_ offset_ opt - Look up which pack and in-pack offset holds
oidwhen listed in the active MIDX. - midx_
oid_ listed_ in_ tip - Returns whether
oidappears in the active MIDX OID table forobjects_dir. - midx_
sidecar_ path_ for_ midx_ file - Resolve a specific MIDX layer file by its lowercase hex checksum. Searches the
incremental chain (
multi-pack-index.d/multi-pack-index-<hash>.midx) and the single-file root MIDX. ReturnsNonewhen no layer matches that checksum. Sidecar pathmulti-pack-index-<hash>.<ext>in the same directory asmidx_path. - read_
midx_ btmp_ ranges - Read per-pack
(bitmap_pos, bitmap_nr)from the active MIDXBTMPchunk. - read_
midx_ objects - Read the tip MIDX and return
(pack_names, objects), where each object names the pack it is attributed to (pack_int_id). Mirrors the per-objectnth_midxed_pack_int_iditeration in Git used by expire/repack. - read_
midx_ pack_ idx_ names - Pack index basenames stored in the active tip MIDX’s pack-names chunk.
- read_
midx_ preferred_ idx_ name read_midx_preferred_idx_namefunction.- resolve_
midx_ bitmap_ layer - Newest chain layer (or root MIDX) that has a non-empty
.bitmapsidecar beside its MIDX file. - resolve_
midx_ layer_ path resolve_midx_layer_pathfunction.- resolve_
tip_ midx_ path resolve_tip_midx_pathfunction.- try_
read_ info_ via_ midx - Like
try_read_object_via_midx, but returnsObjectInfowithout inflating object bodies. - try_
read_ info_ via_ midx_ with_ diagnostics - Like
try_read_info_via_midx, emitting recoverable MIDX warnings throughdiagnostics. - try_
read_ object_ via_ midx - When
core.multiPackIndexis enabled, try to readoidfrom the active MIDX inobjects_dir. - try_
read_ object_ via_ midx_ with_ diagnostics - Like
try_read_object_via_midx, emitting recoverable MIDX warnings throughdiagnostics. - validate_
midx_ referenced_ packs - Validate existing pack indexes named by the active MIDX once per prepared chain view.
- validate_
midx_ referenced_ packs_ with_ diagnostics - Like
validate_midx_referenced_packs, emitting warnings throughdiagnostics. - verify_
midx - Full multi-pack-index verification, mirroring
verify_midx_fileingit/midx.cplus thedie()/error()conditions inload_multi_pack_index. On any problem returns the list of error lines (withouterror:/fatal:prefixes) in the order Git emits them; an empty list means the MIDX is valid. - write_
multi_ pack_ index write_multi_pack_indexfunction.- write_
multi_ pack_ index_ with_ options - Write
multi-pack-indexwith optional preferred pack, bitmap sidecars, and incremental chain.