diff options
author | Taylor Blau <me@ttaylorr.com> | 2020-09-09 17:22:56 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-09 21:51:48 +0200 |
commit | ab14d0676c58389e6f0ccbb9569b07045a05b6df (patch) | |
tree | e2713ff04c0f12ded3be1fecd1f5a9c59c74b18e /fuzz-commit-graph.c | |
parent | t4216: use an '&&'-chain (diff) | |
download | git-ab14d0676c58389e6f0ccbb9569b07045a05b6df.tar.xz git-ab14d0676c58389e6f0ccbb9569b07045a05b6df.zip |
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fuzz-commit-graph.c b/fuzz-commit-graph.c index 430817214d..e7cf6d5b0f 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); |