diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2019-06-10 16:35:23 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-11 10:34:40 -0700 |
commit | cff97116160e57741c9a954a51bfcb0057b3e89d (patch) | |
tree | 991cfb42fdd2eb373675c40f29108ee06b6fc61e /midx.h | |
parent | 81efa161546d8fc9a89f2565d912137df8cc6c89 (diff) | |
download | git-cff97116160e57741c9a954a51bfcb0057b3e89d.tar.gz |
multi-pack-index: prepare for 'expire' subcommand
The multi-pack-index tracks objects in a collection of pack-files.
Only one copy of each object is indexed, using the modified time
of the pack-files to determine tie-breakers. It is possible to
have a pack-file with no referenced objects because all objects
have a duplicate in a newer pack-file.
Introduce a new 'expire' subcommand to the multi-pack-index builtin.
This subcommand will delete these unused pack-files and rewrite the
multi-pack-index to no longer refer to those files. More details
about the specifics will follow as the method is implemented.
Add a test that verifies the 'expire' subcommand is correctly wired,
but will still be valid when the verb is implemented. Specifically,
create a set of packs that should all have referenced objects and
should not be removed during an 'expire' operation. The packs are
created carefully to ensure they have a specific order when sorted
by size. This will be important in a later test.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'midx.h')
-rw-r--r-- | midx.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -50,6 +50,7 @@ int prepare_multi_pack_index_one(struct repository *r, const char *object_dir, i int write_midx_file(const char *object_dir); void clear_midx_file(struct repository *r); int verify_midx_file(struct repository *r, const char *object_dir); +int expire_midx_packs(struct repository *r, const char *object_dir); void close_midx(struct multi_pack_index *m); |