midx: clear midx on repack

If a 'git repack' command replaces existing packfiles, then we must
clear the existing multi-pack-index before moving the packfiles it
references.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Derrick Stolee
2018-07-12 15:39:40 -04:00
committed by Junio C Hamano
parent 17c35c8969
commit 525e18c04b
4 changed files with 31 additions and 0 deletions

1
midx.h
View File

@ -39,5 +39,6 @@ int midx_contains_pack(struct multi_pack_index *m, const char *idx_name);
int prepare_multi_pack_index_one(struct repository *r, const char *object_dir);
int write_midx_file(const char *object_dir);
void clear_midx_file(const char *object_dir);
#endif