]> git.ipfire.org Git - thirdparty/git.git/commit
repack: track the ODB source via existing_packs
authorTaylor Blau <me@ttaylorr.com>
Tue, 19 May 2026 15:57:57 +0000 (11:57 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 May 2026 02:31:13 +0000 (11:31 +0900)
commitf0ef2afb8be0aa37b80bc1cf1f1a9acfb208f00f
treed378a188bfb1c6b4ff066c95c50f7fb83710ed57
parent0cd2255e64b4775520a6acbbb1868437fc26662d
repack: track the ODB source via existing_packs

Store the ODB source in the `existing_packs` struct and use that in
place of the raw `repo->objects->sources` access within `cmd_repack()`.

The source used is still assigned from the first source in the list, so
there are no functional changes in this commit. The changes instead
serve two purposes (one immediate, one not):

 - The incremental MIDX-based repacking machinery will need to know what
   source is being used to read the existing MIDX/chain (should one
   exist).

 - In the future, if "git repack" is taught how to operate on other
   object sources, this field will serve as the authoritative value for
   that source.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/repack.c
repack.c
repack.h