]> git.ipfire.org Git - thirdparty/git.git/commit
t: add test for git refs exists subcommand
authorMeet Soni <meetsoni3017@gmail.com>
Tue, 26 Aug 2025 06:41:10 +0000 (12:11 +0530)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Sep 2025 16:58:36 +0000 (09:58 -0700)
commitef94b3e5c609ea2bd87c7ed9e9fcf8750430e4ac
tree1a5a4342e170c410793964a8fcad690a6386daeb
parent01d429c7bfe6bc494ca43476dfc08cec0ad90a4a
t: add test for git refs exists subcommand

Add a test script, `t/t1462-refs-exists.sh`, for the `git refs exists`
command.

This script acts as a simple driver, leveraging the shared test library
created in the preceding commit. It works by overriding the
`$git_show_ref_exists` variable to "git refs exists" and then sourcing the
shared library (`t/show-ref-exists-tests.sh`).

This approach ensures that `git refs exists` is tested against the
entire comprehensive test suite of `git show-ref --exists`, verifying
that it acts as a compatible drop-in replacement.

Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: shejialuo <shejialuo@gmail.com>
Signed-off-by: Meet Soni <meetsoni3017@gmail.com>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/meson.build
t/t1462-refs-exists.sh [new file with mode: 0755]