]> git.ipfire.org Git - thirdparty/git.git/commit
t: port helper/test-oid-array.c to unit-tests/t-oid-array.c
authorGhanshyam Thakkar <shyamthakkar001@gmail.com>
Sun, 1 Sep 2024 21:26:29 +0000 (02:56 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 2 Sep 2024 03:43:38 +0000 (20:43 -0700)
commita680635e05848f4428b4867b7e7ad0e07c94ae8b
tree250b21a2f981de8c4e571f0526dff5ecc2707ef6
parent6a09c36371cbb902c573aee38d7cfd38f884f448
t: port helper/test-oid-array.c to unit-tests/t-oid-array.c

helper/test-oid-array.c along with t0064-oid-array.sh test the
oid-array.h API, which provides storage and processing
efficiency over large lists of object identifiers.

Migrate them to the unit testing framework for better runtime
performance and efficiency. As we don't initialize a repository
in these tests, the hash algo that functions like oid_array_lookup()
use is not initialized, therefore call repo_set_hash_algo() to
initialize it. And init_hash_algo():lib-oid.c can aid in this
process, so make it public.

Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Helped-by: Phillip Wood <phillip.wood123@gmail.com>
Signed-off-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
t/helper/test-oid-array.c [deleted file]
t/helper/test-tool.c
t/helper/test-tool.h
t/t0064-oid-array.sh [deleted file]
t/unit-tests/lib-oid.c
t/unit-tests/lib-oid.h
t/unit-tests/t-oid-array.c [new file with mode: 0644]