ref-cache: introduce a new type, ref_cache
commit7c22bc8a18744cbd79436a8ce598a0dd5d49869b
authorMichael Haggerty <mhagger@alum.mit.edu>
Sun, 16 Apr 2017 06:41:32 +0000 (16 08:41 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Apr 2017 04:32:46 +0000 (16 21:32 -0700)
tree3daf30ca84cfb8009d6964fd4708480e22eb510d
parent958f964691a250d9a7173f1c0a4c03fd9e71e2aa
ref-cache: introduce a new type, ref_cache

For now, it just wraps a `ref_entry *` that points at the root of the
tree. Soon it will hold more information.

Add two new functions, `create_ref_cache()` and `free_ref_cache()`.
Make `free_ref_entry()` private.

Change files-backend to use this type to hold its caches.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/files-backend.c
refs/ref-cache.c
refs/ref-cache.h