mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
packfile: refactor get_packed_git_mru() to work on packfile store
The `get_packed_git_mru()` function prepares the packfile store and then returns its packfiles in most-recently-used order. Refactor it to accept a packfile store instead of a repository to clarify its scope. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
d2779beb36
commit
dd52a29b78
@@ -148,6 +148,11 @@ struct packed_git *packfile_store_get_packs(struct packfile_store *store);
|
||||
*/
|
||||
struct packed_git *packfile_store_get_all_packs(struct packfile_store *store);
|
||||
|
||||
/*
|
||||
* Get all packs in most-recently-used order.
|
||||
*/
|
||||
struct list_head *packfile_store_get_packs_mru(struct packfile_store *store);
|
||||
|
||||
/*
|
||||
* Open the packfile and add it to the store if it isn't yet known. Returns
|
||||
* either the newly opened packfile or the preexisting packfile. Returns a
|
||||
@@ -232,8 +237,6 @@ int for_each_packed_object(struct repository *repo, each_packed_object_fn cb,
|
||||
#define PACKDIR_FILE_GARBAGE 4
|
||||
extern void (*report_garbage)(unsigned seen_bits, const char *path);
|
||||
|
||||
struct list_head *get_packed_git_mru(struct repository *r);
|
||||
|
||||
/*
|
||||
* Give a rough count of objects in the repository. This sacrifices accuracy
|
||||
* for speed.
|
||||
|
||||
Reference in New Issue
Block a user