git/contrib/completion
Patrick Steinhardt 020e0a087f completion: treat dangling symrefs as existing pseudorefs
The `__git_pseudoref_exists ()` helper function back to git-rev-parse(1)
in case the reftable backend is in use. This is not in the same spirit
as the simple existence check that the "files" backend does though,
because there we only check for the pseudo-ref to exist with `test -f`.
With git-rev-parse(1) we not only check for existence, but also verify
that the pseudo-ref resolves to an object, which may not be the case
when the pseudo-ref points to an unborn branch.

Fix this issue by using `git show-ref --exists` instead. Note that we do
not have to silence stdout anymore as git-show-ref(1) will not print
anything.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-01-16 09:18:21 -08:00
..
.gitattributes completion: mark bash script as LF-only 2017-05-10 13:32:51 +09:00
git-completion.bash completion: treat dangling symrefs as existing pseudorefs 2024-01-16 09:18:21 -08:00
git-completion.tcsh completion: tcsh: Fix regression by drop of wrapper functions 2021-08-18 13:58:27 -07:00
git-completion.zsh contrib/completion: fix zsh completion regression from 59d85a2a05 2021-06-02 12:49:40 +09:00
git-prompt.sh Merge branch 'ek/completion-use-read-r-to-read-literally' 2023-05-02 10:13:34 -07:00