summaryrefslogtreecommitdiff
path: root/t/helper/test-read-graph.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2020-09-09 15:23:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-09 19:51:48 (GMT)
commit24f951a4924e72e51d4b658084902390f341ec2e (patch)
tree291654f14295da1c96bd25d0833028b09997d139 /t/helper/test-read-graph.c
parentab14d0676c58389e6f0ccbb9569b07045a05b6df (diff)
downloadgit-24f951a4924e72e51d4b658084902390f341ec2e.zip
git-24f951a4924e72e51d4b658084902390f341ec2e.tar.gz
git-24f951a4924e72e51d4b658084902390f341ec2e.tar.bz2
t/helper/test-read-graph.c: prepare repo settings
The read-graph test-tool is used by a number of the commit-graph test to assert various properties about a commit-graph. Previously, this program never ran 'prepare_repo_settings()'. There was no need to do so, since none of the commit-graph machinery is affected by the repo settings. In the next patch, the commit-graph machinery's behavior will become dependent on the repo settings, and so loading them before running the rest of the test tool is critical. As such, teach the test tool to call 'prepare_repo_settings()'. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-read-graph.c')
-rw-r--r--t/helper/test-read-graph.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/helper/test-read-graph.c b/t/helper/test-read-graph.c
index 6d0c962..5f585a1 100644
--- a/t/helper/test-read-graph.c
+++ b/t/helper/test-read-graph.c
@@ -12,11 +12,12 @@ int cmd__read_graph(int argc, const char **argv)
setup_git_directory();
odb = the_repository->objects->odb;
+ prepare_repo_settings(the_repository);
+
graph = read_commit_graph_one(the_repository, odb);
if (!graph)
return 1;
-
printf("header: %08x %d %d %d %d\n",
ntohl(*(uint32_t*)graph->data),
*(unsigned char*)(graph->data + 4),