@matheusbsbs / matheus-bagliano / commits / 6946e525ae
Fork 0

t/helper/test-dump-split-index: initialize git repository

In this test helper, we read the index. In order to have the proper hash algorithm set up, we must call setup_git_directory. Do so, so that the test works when extensions.objectFormat is set. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Feb 22, 2020 at 20:17 UTC 6946e525ae19dc756ff0a2a46abf1d1d30511594
1 file changed +2
t/helper/test-dump-split-index.c
+2
@@ -13,6 +13,8 @@ int cmd__dump_split_index(int ac, const char **av)
13 struct split_index *si;
14 int i;
15
16 + setup_git_directory();
17 +
18 do_read_index(&the_index, av[1], 1);
19 printf("own %s\n", oid_to_hex(&the_index.oid));
20 si = the_index.split_index;