Re: [PATCH v3] commit-graph: refactor to avoid prepare_repo_settings
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jun 14, 2022, 23:32 UTC
- Message-ID
- <YqkamW45+VbIfJI4@nand.local>
- In-Reply-To
- <9b56496b0809cc8a25af877ea97042e2cb7f2af6.1655246092.git.steadmon@google.com>
On Tue, Jun 14, 2022 at 03:37:21PM -0700, Josh Steadmon wrote:
Show 15 quoted lines
> Range-diff against v2: > 1: 2c2bfc7b43 ! 1: 9b56496b08 commit-graph: refactor to avoid prepare_repo_settings > @@ fuzz-commit-graph.c: int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size > initialize_the_repository(); > - g = parse_commit_graph(the_repository, (void *)data, size); > + /* > -+ * Manually initialize commit-graph settings, to avoid the need to run > -+ * in an actual repository. > ++ * Initialize the_repository with commit-graph settings that would > ++ * normally be read from the repository's gitdir. We want to avoid > ++ * touching the disk to keep the individual fuzz-test cases as fast as > ++ * possible. > + */ > + the_repository->settings.commit_graph_generation_version = 2; > + the_repository->settings.commit_graph_read_changed_paths = 1;
This version looks good to me. Thanks for working on this, Josh!
Thanks, Taylor