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

Function clear_midx_file_ext

midx.c:765–777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

763};
764
765static void clear_midx_file_ext(const char *full_path, size_t full_path_len UNUSED,
766 const char *file_name, void *_data)
767{
768 struct clear_midx_data *data = _data;
769
770 if (!(starts_with(file_name, "multi-pack-index-") &&
771 ends_with(file_name, data->ext)))
772 return;
773 if (strset_contains(&data->keep, file_name))
774 return;
775 if (unlink(full_path))
776 die_errno(_("failed to remove %s"), full_path);
777}
778
779void clear_midx_files_ext(struct odb_source *source, const char *ext,
780 const char *keep_hash)

Callers

nothing calls this directly

Calls 4

starts_withFunction · 0.85
ends_withFunction · 0.85
strset_containsFunction · 0.85
die_errnoFunction · 0.85

Tested by

no test coverage detected