MCPcopy Create free account
hub / github.com/git/git / repack_remove_redundant_pack

Function repack_remove_redundant_pack

repack.c:57–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void repack_remove_redundant_pack(struct repository *repo, const char *dir_name,
58 const char *base_name,
59 bool wrote_incremental_midx)
60{
61 struct strbuf buf = STRBUF_INIT;
62 struct odb_source *source = repo->objects->sources;
63 struct multi_pack_index *m = get_multi_pack_index(source);
64 strbuf_addf(&buf, "%s.pack", base_name);
65 if (m && source->local && midx_contains_pack(m, buf.buf)) {
66 clear_midx_file(repo);
67 if (!wrote_incremental_midx)
68 clear_incremental_midx_files(repo, NULL);
69 }
70 strbuf_insertf(&buf, 0, "%s/", dir_name);
71 unlink_pack_path(buf.buf, 1);
72 strbuf_release(&buf);
73}
74
75const char *write_pack_opts_pack_prefix(const struct write_pack_opts *opts)
76{

Callers 2

remove_redundant_packsFunction · 0.85
remove_redundant_packs_1Function · 0.85

Calls 8

get_multi_pack_indexFunction · 0.85
strbuf_addfFunction · 0.85
midx_contains_packFunction · 0.85
clear_midx_fileFunction · 0.85
strbuf_insertfFunction · 0.85
unlink_pack_pathFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected