aboutsummaryrefslogtreecommitdiffstats
path: root/t/show-ref-exists-tests.sh (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-09-02t1422: refactor tests to be shareableMeet Soni1-0/+77
In preparation for adding tests for the `git refs exists` command, refactor the existing t1422 test suite to make its logic shareable. Move the core test logic from `t1422-show-ref-exists.sh` to `show-ref-exists-tests.sh` file. Inside this script, replace hardcoded calls to "git show-ref --exists" with the `$git_show_ref_exists` variable. The original `t1422-show-ref-exists.sh` script now becomes a simple "driver". It is responsible for setting the default value of the variable and then sourcing the test library. This structure follows an established pattern for sharing tests and prepares the test suite for the `refs exists` tests to be added in a subsequent commit. 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>