git/refs
Michael Haggerty df30875987 ref-cache: use a callback function to fill the cache
It is a leveling violation for `ref_cache` to know about
`files_ref_store` or that it should call `read_loose_refs()` to lazily
fill cache directories. So instead, have its constructor take as an
argument a callback function that it should use for lazy-filling, and
change `files_ref_store` to supply a pointer to function
`read_loose_refs` (renamed to `loose_fill_ref_dir`) when creating the
ref cache for its loose refs.

This means that we can generify the type of the back-pointer in
`struct ref_cache` from `files_ref_store` to `ref_store`.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-04-16 21:32:46 -07:00
..
files-backend.c ref-cache: use a callback function to fill the cache 2017-04-16 21:32:46 -07:00
iterator.c do_for_each_ref(): reimplement using reference iteration 2016-06-20 11:38:20 -07:00
ref-cache.c ref-cache: use a callback function to fill the cache 2017-04-16 21:32:46 -07:00
ref-cache.h ref-cache: use a callback function to fill the cache 2017-04-16 21:32:46 -07:00
refs-internal.h refs_verify_refname_available(): implement once for all backends 2017-04-16 21:32:45 -07:00