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

Function clear_midx_files_ext

midx.c:779–799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

777}
778
779void clear_midx_files_ext(struct odb_source *source, const char *ext,
780 const char *keep_hash)
781{
782 struct clear_midx_data data = {
783 .keep = STRSET_INIT,
784 .ext = ext,
785 };
786
787 if (keep_hash) {
788 struct strbuf buf = STRBUF_INIT;
789 strbuf_addf(&buf, "multi-pack-index-%s.%s", keep_hash, ext);
790
791 strset_add(&data.keep, buf.buf);
792
793 strbuf_release(&buf);
794 }
795
796 for_each_file_in_pack_dir(source->path, clear_midx_file_ext, &data);
797
798 strset_clear(&data.keep);
799}
800
801void clear_incremental_midx_files_ext(struct odb_source *source, const char *ext,
802 const struct strvec *keep_hashes)

Callers 3

clear_midx_fileFunction · 0.85
clear_midx_filesFunction · 0.85
write_midx_internalFunction · 0.85

Calls 5

strbuf_addfFunction · 0.85
strset_addFunction · 0.85
strbuf_releaseFunction · 0.85
strset_clearFunction · 0.85

Tested by

no test coverage detected