diagnose.c: add option to configure archive contents
[alt-git.git] / fuzz-commit-graph.c
blob914026f5d80f876c8a7c28a914a58295a5a72346
1 #include "commit-graph.h"
2 #include "repository.h"
4 struct commit_graph *parse_commit_graph(struct repo_settings *s,
5 void *graph_map, size_t graph_size);
7 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
9 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
11 struct commit_graph *g;
13 initialize_the_repository();
15 * Initialize the_repository with commit-graph settings that would
16 * normally be read from the repository's gitdir. We want to avoid
17 * touching the disk to keep the individual fuzz-test cases as fast as
18 * possible.
20 the_repository->settings.commit_graph_generation_version = 2;
21 the_repository->settings.commit_graph_read_changed_paths = 1;
22 g = parse_commit_graph(&the_repository->settings, (void *)data, size);
23 repo_clear(the_repository);
24 free_commit_graph(g);
26 return 0;