| 55 | } |
| 56 | |
| 57 | void 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 | |
| 75 | const char *write_pack_opts_pack_prefix(const struct write_pack_opts *opts) |
| 76 | { |
no test coverage detected