| 763 | }; |
| 764 | |
| 765 | static 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 | |
| 779 | void clear_midx_files_ext(struct odb_source *source, const char *ext, |
| 780 | const char *keep_hash) |
nothing calls this directly
no test coverage detected