diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-08-25 14:22:03 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-08-25 14:22:03 -0700 |
| commit | eed447dd959bd99a24c43688b7f6f14f727b550b (patch) | |
| tree | 190b5a331ba5304f6b182f7974ecd3a09cafcb21 /oss-fuzz/fuzz-commit-graph.c | |
| parent | Merge branch 'ds/doc-count-objects-fix' (diff) | |
| parent | commit-graph: stop passing in redundant repository (diff) | |
| download | git-eed447dd959bd99a24c43688b7f6f14f727b550b.tar.gz git-eed447dd959bd99a24c43688b7f6f14f727b550b.zip | |
Merge branch 'ps/commit-graph-wo-globals'
Remove dependency on the_repository and other globals from the
commit-graph code, and other changes unrelated to de-globaling.
* ps/commit-graph-wo-globals:
commit-graph: stop passing in redundant repository
commit-graph: stop using `the_repository`
commit-graph: stop using `the_hash_algo`
commit-graph: refactor `parse_commit_graph()` to take a repository
commit-graph: store the hash algorithm instead of its length
commit-graph: stop using `the_hash_algo` via macros
Diffstat (limited to 'oss-fuzz/fuzz-commit-graph.c')
| -rw-r--r-- | oss-fuzz/fuzz-commit-graph.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/oss-fuzz/fuzz-commit-graph.c b/oss-fuzz/fuzz-commit-graph.c index fbb77fec19..fb8b8787a4 100644 --- a/oss-fuzz/fuzz-commit-graph.c +++ b/oss-fuzz/fuzz-commit-graph.c @@ -4,9 +4,6 @@ #include "commit-graph.h" #include "repository.h" -struct commit_graph *parse_commit_graph(struct repo_settings *s, - void *graph_map, size_t graph_size); - int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) @@ -22,9 +19,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) * possible. */ repo_set_hash_algo(the_repository, GIT_HASH_SHA1); + the_repository->settings.initialized = 1; the_repository->settings.commit_graph_generation_version = 2; the_repository->settings.commit_graph_changed_paths_version = 1; - g = parse_commit_graph(&the_repository->settings, (void *)data, size); + g = parse_commit_graph(the_repository, (void *)data, size); repo_clear(the_repository); free_commit_graph(g); |
