git/refs
Patrick Steinhardt 0fcc285c5e refs: refactor logic to look up storage backends
In order to look up ref storage backends, we're currently using a linked
list of backends, where each backend is expected to set up its `next`
pointer to the next ref storage backend. This is kind of a weird setup
as backends need to be aware of other backends without much of a reason.

Refactor the code so that the array of backends is centrally defined in
"refs.c", where each backend is now identified by an integer constant.
Expose functions to translate from those integer constants to the name
and vice versa, which will be required by subsequent patches.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-01-02 09:24:47 -08:00
..
debug.c refs: refactor logic to look up storage backends 2024-01-02 09:24:47 -08:00
files-backend.c refs: refactor logic to look up storage backends 2024-01-02 09:24:47 -08:00
iterator.c treewide: remove unnecessary cache.h inclusion from several sources 2023-03-21 10:56:51 -07:00
packed-backend.c refs: refactor logic to look up storage backends 2024-01-02 09:24:47 -08:00
packed-backend.h Revert "Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'" 2022-04-13 15:51:33 -07:00
ref-cache.c ref-cache.c: fix prefix matching in ref iteration 2023-10-09 15:53:13 -07:00
ref-cache.h hash-ll.h: split out of hash.h to remove dependency on repository.h 2023-04-24 12:47:32 -07:00
refs-internal.h refs: refactor logic to look up storage backends 2024-01-02 09:24:47 -08:00