]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/helper: initialize the repository for test-sha1-array
authorbrian m. carlson <sandals@crustytoothpaste.net>
Fri, 19 Jun 2020 17:55:55 +0000 (17:55 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Jun 2020 21:04:08 +0000 (14:04 -0700)
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>
t/helper/test-oid-array.c

index ce9fd5f0919f76ee3660cec5464b8a31c65eba07..b16cd0b11b147559e01f4413213148a70f4cb9e1 100644 (file)
@@ -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;