t: use git-show-ref(1) to check for ref existence
commit0497e6c61172faabf412e013f2fc30a05054a46d
authorPatrick Steinhardt <ps@pks.im>
Tue, 31 Oct 2023 08:16:59 +0000 (31 09:16 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Nov 2023 03:09:01 +0000 (1 12:09 +0900)
tree25d1588270a35a905b41a181037533c0873a28ad
parent9080a7f1782b55ee146dd7f9b4f464fe5ea8747a
t: use git-show-ref(1) to check for ref existence

Convert tests that use `test_path_is_file` and `test_path_is_missing` to
instead use a set of helpers `test_ref_exists` and `test_ref_missing`.
These helpers are implemented via the newly introduced `git show-ref
--exists` command. Thus, we can avoid intimate knowledge of how the ref
backend stores references on disk.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1430-bad-ref-name.sh
t/t3200-branch.sh
t/t5521-pull-options.sh
t/t5605-clone-local.sh
t/test-lib-functions.sh