summaryrefslogtreecommitdiff
path: root/t/helper
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-02-22 20:17:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-24 17:33:24 (GMT)
commit6946e525ae19dc756ff0a2a46abf1d1d30511594 (patch)
tree724550ef2e1f795d86b530de1d16f3efa81dc086 /t/helper
parent8bd5a2906ebca9e2d7fcecd1628c1585ffbd85d3 (diff)
downloadgit-6946e525ae19dc756ff0a2a46abf1d1d30511594.zip
git-6946e525ae19dc756ff0a2a46abf1d1d30511594.tar.gz
git-6946e525ae19dc756ff0a2a46abf1d1d30511594.tar.bz2
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>
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-dump-split-index.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/helper/test-dump-split-index.c b/t/helper/test-dump-split-index.c
index 63c689d..a209880 100644
--- a/t/helper/test-dump-split-index.c
+++ b/t/helper/test-dump-split-index.c
@@ -13,6 +13,8 @@ int cmd__dump_split_index(int ac, const char **av)
struct split_index *si;
int i;
+ setup_git_directory();
+
do_read_index(&the_index, av[1], 1);
printf("own %s\n", oid_to_hex(&the_index.oid));
si = the_index.split_index;