summaryrefslogtreecommitdiffstats
path: root/ref-filter.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-05-15 08:51:01 +0200
committerJunio C Hamano <gitster@pobox.com>2024-05-15 16:30:52 +0200
commit993d57ededa2238e7526ccdb05b39b0265053f37 (patch)
tree6e690bb62f878a9db3853934d2586b41daea43a6 /ref-filter.c
parentrefs: classify HEAD as a root ref (diff)
downloadgit-993d57ededa2238e7526ccdb05b39b0265053f37.tar.xz
git-993d57ededa2238e7526ccdb05b39b0265053f37.zip
refs: pseudorefs are no refs
The `is_root_ref()` function will happily clarify a pseudoref as a root ref, even though pseudorefs are no refs. Next to being wrong, it also leads to inconsistent behaviour across ref backends: while the "files" backend accidentally knows to parse those pseudorefs and thus yields them to the caller, the "reftable" backend won't ever see the pseudoref at all because they are never stored in the "reftable" backend. Fix this issue by filtering out pseudorefs in `is_root_ref()`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ref-filter.c')
0 files changed, 0 insertions, 0 deletions