diff options
author | René Scharfe <l.s.r@web.de> | 2019-01-06 17:45:30 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-08 09:40:19 -0800 |
commit | 0000d6543f1c2ceea017161a2807167cdfbf8c0b (patch) | |
tree | 5b6a69a5dedba99739ecee0c2f9c617ab4cac157 /object-store.h | |
parent | ecbdaf0899161c067986e9d9d564586d4b045d62 (diff) | |
download | git-0000d6543f1c2ceea017161a2807167cdfbf8c0b.tar.gz |
object-store: factor out odb_loose_cache()
Add and use a function for loading the entries of a loose object
subdirectory for a given object ID. It frees callers from deriving the
fanout key; they can use the returned oid_array reference for lookups or
forward range scans.
Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-store.h')
-rw-r--r-- | object-store.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/object-store.h b/object-store.h index 60758efad8..7236c571c0 100644 --- a/object-store.h +++ b/object-store.h @@ -54,6 +54,13 @@ void add_to_alternates_memory(const char *dir); */ void odb_load_loose_cache(struct object_directory *odb, int subdir_nr); +/* + * Populate and return the loose object cache array corresponding to the + * given object ID. + */ +struct oid_array *odb_loose_cache(struct object_directory *odb, + const struct object_id *oid); + struct packed_git { struct packed_git *next; struct list_head mru; |