summaryrefslogtreecommitdiff
path: root/fuzz-commit-graph.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2020-09-09 15:22:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-09 19:51:48 (GMT)
commitab14d0676c58389e6f0ccbb9569b07045a05b6df (patch)
treee2713ff04c0f12ded3be1fecd1f5a9c59c74b18e /fuzz-commit-graph.c
parent025d52943e89ad01791bb5c4db106b87ebfe3889 (diff)
downloadgit-ab14d0676c58389e6f0ccbb9569b07045a05b6df.zip
git-ab14d0676c58389e6f0ccbb9569b07045a05b6df.tar.gz
git-ab14d0676c58389e6f0ccbb9569b07045a05b6df.tar.bz2
commit-graph: pass a 'struct repository *' in more places
In a future commit, some commit-graph internals will want access to 'r->settings', but we only have the 'struct object_directory *' corresponding to that repository. Add an additional parameter to pass the repository around in more places. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fuzz-commit-graph.c')
-rw-r--r--fuzz-commit-graph.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fuzz-commit-graph.c b/fuzz-commit-graph.c
index 4308172..e7cf6d5 100644
--- a/fuzz-commit-graph.c
+++ b/fuzz-commit-graph.c
@@ -1,7 +1,8 @@
#include "commit-graph.h"
#include "repository.h"
-struct commit_graph *parse_commit_graph(void *graph_map, size_t graph_size);
+struct commit_graph *parse_commit_graph(struct repository *r,
+ void *graph_map, size_t graph_size);
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
@@ -10,7 +11,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
struct commit_graph *g;
initialize_the_repository();
- g = parse_commit_graph((void *)data, size);
+ g = parse_commit_graph(the_repository, (void *)data, size);
repo_clear(the_repository);
free_commit_graph(g);