git-commit-vandalism/refs
Ævar Arnfjörð Bjarmason 5b8754043c refs debug: add a wrapper for "read_symbolic_ref"
In cd475b3b03 (refs: add ability for backends to special-case reading
of symbolic refs, 2022-03-01) when the "read_symbolic_ref" callback
was added we'd fall back on "refs_read_raw_ref" if there wasn't any
backend implementation of "read_symbolic_ref".

As discussed in the preceding commit this would only happen if we were
running the "debug" backend, e.g. in the "setup for ref completion"
test in t9902-completion.sh with:

    GIT_TRACE_REFS=1 git fetch --no-tags other

Let's improve the trace output, but and also eliminate the
now-redundant refs_read_raw_ref() fallback case. As noted in the
preceding commit the "packed" backend will never call
refs_read_symbolic_ref() (nor is it ever going to). For any future
backend such as reftable it's OK to ask that they either implement
this (or a wrapper) themselves.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-17 10:40:14 -07:00
..
debug.c refs debug: add a wrapper for "read_symbolic_ref" 2022-03-17 10:40:14 -07:00
files-backend.c refs: use designated initializers for "struct ref_iterator_vtable" 2022-03-17 10:36:11 -07:00
iterator.c refs: use designated initializers for "struct ref_iterator_vtable" 2022-03-17 10:36:11 -07:00
packed-backend.c packed-backend: remove stub BUG(...) functions 2022-03-17 10:38:05 -07:00
packed-backend.h Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs' 2022-02-18 13:53:27 -08:00
ref-cache.c refs: use designated initializers for "struct ref_iterator_vtable" 2022-03-17 10:36:11 -07:00
ref-cache.h Merge branch 'jt/no-abuse-alternate-odb-for-submodules' 2021-10-25 16:06:56 -07:00
refs-internal.h refs: add ability for backends to special-case reading of symbolic refs 2022-03-01 10:13:46 -08:00