summaryrefslogtreecommitdiff
path: root/t/helper/test-read-graph.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-05-01 13:39:52 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-05-01 13:39:52 -0700
commit6a1c17d05b0e67fa5f9661f492f407b984496b27 (patch)
tree2abe4b8ae7cb8eb78e93ca07cd1e9426a876297d /t/helper/test-read-graph.c
parentMerge branch 'tb/reset-shallow' (diff)
parentRevert "commit-graph.c: introduce '--[no-]check-oids'" (diff)
downloadtgif-6a1c17d05b0e67fa5f9661f492f407b984496b27.tar.xz
Merge branch 'tb/commit-graph-split-strategy'
"git commit-graph write" learned different ways to write out split files. * tb/commit-graph-split-strategy: Revert "commit-graph.c: introduce '--[no-]check-oids'" commit-graph.c: introduce '--[no-]check-oids' commit-graph.h: replace 'commit_hex' with 'commits' oidset: introduce 'oidset_size' builtin/commit-graph.c: introduce split strategy 'replace' builtin/commit-graph.c: introduce split strategy 'no-merge' builtin/commit-graph.c: support for '--split[=<strategy>]' t/helper/test-read-graph.c: support commit-graph chains
Diffstat (limited to 't/helper/test-read-graph.c')
-rw-r--r--t/helper/test-read-graph.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/t/helper/test-read-graph.c b/t/helper/test-read-graph.c
index f8a461767c..4846040363 100644
--- a/t/helper/test-read-graph.c
+++ b/t/helper/test-read-graph.c
@@ -7,26 +7,15 @@
int cmd__read_graph(int argc, const char **argv)
{
struct commit_graph *graph = NULL;
- char *graph_name;
- int open_ok;
- int fd;
- struct stat st;
struct object_directory *odb;
setup_git_directory();
odb = the_repository->objects->odb;
- graph_name = get_commit_graph_filename(odb);
-
- open_ok = open_commit_graph(graph_name, &fd, &st);
- if (!open_ok)
- die_errno(_("Could not open commit-graph '%s'"), graph_name);
-
- graph = load_commit_graph_one_fd_st(fd, &st, odb);
+ graph = read_commit_graph_one(the_repository, odb);
if (!graph)
return 1;
- FREE_AND_NULL(graph_name);
printf("header: %08x %d %d %d %d\n",
ntohl(*(uint32_t*)graph->data),