]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t: make test-bloom initialize repository
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 29 Jul 2020 23:13:50 +0000 (23:13 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2020 16:16:45 +0000 (09:16 -0700)
The bloom filter code relies on reading object IDs using parse_oid_hex.
In order to make that work with an appropriate size, we need to have
initialized the repository's hash algorithm.  Since the values we're
processing depend on the repository in use, let's set up the repository
when we run the test helper.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-bloom.c

index f0aa80b98eb3240c59db99e2b5fbc186fd87c717..5e77d56f599cb9641d853cd4f6e3fd8b3bee0001 100644 (file)
@@ -50,6 +50,8 @@ static const char *bloom_usage = "\n"
 
 int cmd__bloom(int argc, const char **argv)
 {
+       setup_git_directory();
+
        if (argc < 2)
                usage(bloom_usage);