t/helper: make repository tests hash independent
commitbf154a878281b6a971ece0fb6d917938298be60d
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sat, 22 Feb 2020 20:17:36 +0000 (22 20:17 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Feb 2020 17:33:27 +0000 (24 09:33 -0800)
tree37bdeed2ca5d55540cc6fccb4ef1013fa95805b5
parent8dca7f30e4e5da31b375ecaeeac995305c9c0c5c
t/helper: make repository tests hash independent

This test currently hard-codes the hash algorithm as SHA-1 when calling
repo_set_hash_algo so that the_hash_algo is properly initialized.
However, this does not work with SHA-256 repositories. Read the
repository value that repo_init has read into the local repository
variable and set the algorithm based on that value.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-repository.c