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>
This commit is contained in:
Taylor Blau
2020-09-09 11:22:56 -04:00
committed by Junio C Hamano
parent 025d52943e
commit ab14d0676c
4 changed files with 18 additions and 12 deletions

View File

@ -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);