aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/repack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-08-03 18:44:26 -0700
committerJunio C Hamano <gitster@pobox.com>2025-08-03 18:44:27 -0700
commit733b640d5099df783f28ddf8ce35749b8c53f206 (patch)
treebab82ea9d69c97b7818a82f54c451ee1e1906113 /builtin/repack.c
parent8d9f536a5106231a3ed24e392eeb28b7b304fe5e (diff)
parentec865d94d4615c00fbf9ac50f4274b1d3fbf73a6 (diff)
downloadgit-733b640d5099df783f28ddf8ce35749b8c53f206.tar.gz
Merge branch 'ps/object-store-midx'
Redefine where the multi-pack-index sits in the object subsystem, which recently was restructured to allow multiple backends that support a single object source that belongs to one repository. A midx does span mulitple "object sources". * ps/object-store-midx: midx: remove now-unused linked list of multi-pack indices packfile: stop using linked MIDX list in `get_all_packs()` packfile: stop using linked MIDX list in `find_pack_entry()` packfile: refactor `get_multi_pack_index()` to work on sources midx: stop using linked list when closing MIDX packfile: refactor `prepare_packed_git_one()` to work on sources midx: start tracking per object database source
Diffstat (limited to 'builtin/repack.c')
-rw-r--r--builtin/repack.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/repack.c b/builtin/repack.c
index 75158d7776..21723866b9 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -223,9 +223,9 @@ static void mark_packs_for_deletion(struct existing_packs *existing,
static void remove_redundant_pack(const char *dir_name, const char *base_name)
{
struct strbuf buf = STRBUF_INIT;
- struct multi_pack_index *m = get_local_multi_pack_index(the_repository);
+ struct multi_pack_index *m = get_multi_pack_index(the_repository->objects->sources);
strbuf_addf(&buf, "%s.pack", base_name);
- if (m && midx_contains_pack(m, buf.buf))
+ if (m && m->local && midx_contains_pack(m, buf.buf))
clear_midx_file(the_repository);
strbuf_insertf(&buf, 0, "%s/", dir_name);
unlink_pack_path(buf.buf, 1);
@@ -1531,7 +1531,7 @@ int cmd_repack(int argc,
* midx_has_unknown_packs() will make the decision for
* us.
*/
- if (!get_local_multi_pack_index(the_repository))
+ if (!get_multi_pack_index(the_repository->objects->sources))
midx_must_contain_cruft = 1;
}
@@ -1614,9 +1614,9 @@ int cmd_repack(int argc,
string_list_sort(&names);
- if (get_local_multi_pack_index(the_repository)) {
+ if (get_multi_pack_index(the_repository->objects->sources)) {
struct multi_pack_index *m =
- get_local_multi_pack_index(the_repository);
+ get_multi_pack_index(the_repository->objects->sources);
ALLOC_ARRAY(midx_pack_names,
m->num_packs + m->num_packs_in_base);