]> git.ipfire.org Git - thirdparty/git.git/commit
t/: migrate helper/test-{sha1, sha256} to unit-tests/t-hash
authorGhanshyam Thakkar <shyamthakkar001@gmail.com>
Wed, 29 May 2024 08:00:30 +0000 (13:30 +0530)
committerJunio C Hamano <gitster@pobox.com>
Wed, 29 May 2024 16:11:41 +0000 (09:11 -0700)
commit279493254864f0cbc002e1768de6e4f634c8150c
tree3402d4eed5935a26805e5529cf7cfeeaba0f8176
parenta70f8f19ad2a147a5bfe764fb99379b8f6cb50a5
t/: migrate helper/test-{sha1, sha256} to unit-tests/t-hash

t/helper/test-{sha1, sha256} and t/t0015-hash.sh test the hash
implementation of SHA-1 and SHA-256 in Git with basic hash values.
Migrate them to the new unit testing framework for better debugging
and runtime performance.

The 'sha1' and 'sha256' subcommands are still not removed due to
pack_trailer():lib-pack.sh's reliance on them. The 'sha1' subcommand
is also relied upon by t0013-sha1dc (which requires 'test-tool
sha1' dying when it is used on a file created to contain the
known sha1 attack).

Helped-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Co-authored-by: Achu Luma <ach.lumap@gmail.com>
Signed-off-by: Achu Luma <ach.lumap@gmail.com>
Signed-off-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
t/t0015-hash.sh [deleted file]
t/unit-tests/t-hash.c [new file with mode: 0644]