summaryrefslogtreecommitdiff
path: root/t/helper
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-06-19 17:55:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-06-19 21:04:08 (GMT)
commit54cbbe4c6e4f82a765e70bcd28172e7d56542991 (patch)
tree397f983d0097df5d43c0dfd0693b2ec3807b7b2f /t/helper
parent97997e6ad2790e58c727c180548a3d0073c4c1d2 (diff)
downloadgit-54cbbe4c6e4f82a765e70bcd28172e7d56542991.zip
git-54cbbe4c6e4f82a765e70bcd28172e7d56542991.tar.gz
git-54cbbe4c6e4f82a765e70bcd28172e7d56542991.tar.bz2
t/helper: initialize the repository for test-sha1-array
test-sha1-array uses the_hash_algo under the hood. Since t0064 wants to use the value that is correct for the hash algorithm that we're testing, make sure the test helper initializes the repository to set the_hash_algo correctly. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-oid-array.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/helper/test-oid-array.c b/t/helper/test-oid-array.c
index ce9fd5f..b16cd0b 100644
--- a/t/helper/test-oid-array.c
+++ b/t/helper/test-oid-array.c
@@ -12,6 +12,9 @@ int cmd__oid_array(int argc, const char **argv)
{
struct oid_array array = OID_ARRAY_INIT;
struct strbuf line = STRBUF_INIT;
+ int nongit_ok;
+
+ setup_git_directory_gently(&nongit_ok);
while (strbuf_getline(&line, stdin) != EOF) {
const char *arg;