With the upcoming introduction of the reftable backend, it becomes ever so important to provide the necessary tooling for printing all refs associated with a repository. While regular refs stored within the "refs/" namespace are currently supported by multiple commands like git-for-each-ref(1), git-show-ref(1). Neither support printing all the operational refs within the repository. This is crucial because with the reftable backend, all these refs will also move to reftable. It would be necessary to identify all the refs that are stored within the reftable since there is no easy way to do so otherwise. This is because the reftable itself is a binary format and all access will be via git. Unlike the filesystem backend, which allows access directly via the filesystem. This patch series is a follow up to the RFC/discussion we had earlier on the list [1]. The first 4 commits add the required functionality to ensure we can print all refs (regular, pseudo, HEAD). The 5th commit modifies the git-for-each-ref(1) command to print all refs when an empty string pattern is used. This is a deviation from the current situation wherein the empty string pattern currently matches and prints no refs. [1]: https://lore.kernel.org/git/20231221170715.110565-1-karthik.188@xxxxxxxxx/#t Karthik Nayak (5): refs: expose `is_pseudoref_syntax()` refs: make `is_pseudoref_syntax()` stricter refs: extract out `loose_fill_ref_dir_regular_file()` refs: introduce `refs_for_each_all_refs()` for-each-ref: avoid filtering on empty pattern Documentation/git-for-each-ref.txt | 3 +- builtin/for-each-ref.c | 21 ++++- ref-filter.c | 13 ++- ref-filter.h | 4 +- refs.c | 32 ++++++-- refs.h | 12 +++ refs/files-backend.c | 126 +++++++++++++++++++++-------- refs/refs-internal.h | 7 ++ t/t1407-worktree-ref-store.sh | 12 +-- t/t6302-for-each-ref-filter.sh | 34 ++++++++ 10 files changed, 214 insertions(+), 50 deletions(-) -- 2.43.GIT