diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-09-02 09:38:03 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-09-02 09:38:03 -0700 |
| commit | 0b71555742352e240275a3fe719acc7c19245573 (patch) | |
| tree | 0d3388afc21403926271a2bd77e916cfcf1afe68 /builtin/repack.c | |
| parent | 6ad802182101d622e6a4132f48292ddfa79e2024 (diff) | |
| parent | 13296ac909d53e14712f89a7f4fda94dd0465479 (diff) | |
| download | git-0b71555742352e240275a3fe719acc7c19245573.tar.xz | |
Merge branch 'ps/object-store-midx-dedup-info' into ps/packfile-store
* ps/object-store-midx-dedup-info:
midx: compute paths via their source
midx: stop duplicating info redundant with its owning source
midx: write multi-pack indices via their source
midx: load multi-pack indices via their source
midx: drop redundant `struct repository` parameter
odb: simplify calling `link_alt_odb_entry()`
odb: return newly created in-memory sources
odb: consistently use "dir" to refer to alternate's directory
odb: allow `odb_find_source()` to fail
odb: store locality in object database sources
Diffstat (limited to 'builtin/repack.c')
| -rw-r--r-- | builtin/repack.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/repack.c b/builtin/repack.c index a4def39197..c490a51e91 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -223,9 +223,10 @@ 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_multi_pack_index(the_repository->objects->sources); + struct odb_source *source = the_repository->objects->sources; + struct multi_pack_index *m = get_multi_pack_index(source); strbuf_addf(&buf, "%s.pack", base_name); - if (m && m->local && midx_contains_pack(m, buf.buf)) + if (m && source->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); @@ -1711,7 +1712,7 @@ int cmd_repack(int argc, unsigned flags = 0; if (git_env_bool(GIT_TEST_MULTI_PACK_INDEX_WRITE_INCREMENTAL, 0)) flags |= MIDX_WRITE_INCREMENTAL; - write_midx_file(the_repository, repo_get_object_directory(the_repository), + write_midx_file(the_repository->objects->sources, NULL, NULL, flags); } |
