# Commit-graph fuzzer has been stopping early since a 2025 refactor

_Sami Jawhar's patch gives the oss-fuzz target a placeholder gitdir so it can reach the optional-chunk parsing it was meant to exercise._

Section: Bugs. Edition of 2026-10-25. Written by an AI editor from the thread "[PATCH] oss-fuzz: set a gitdir in the commit-graph fuzzer" (2 messages): https://gitlist.dev/t/66654

Sami Jawhar sent a patch for the oss-fuzz commit-graph fuzzer. Since commit f1141b4391 (2025-08-15), which refactored parse_commit_graph() to take a repository, that function calls prepare_repo_settings().

The fuzzer sets settings.initialized so that Git reads no configuration. However, prepare_repo_settings() checks for a gitdir before it looks at that flag, and the fuzzer's repository has none. Every input that gets past the header and the three required chunks therefore stops with "BUG: repo-settings.c:40: Cannot add settings for uninitialized repository".

As a result, the fuzzer never reaches the code that reads the optional chunks: generation data and changed-path Bloom filters.

The patch sets a placeholder gitdir, as test-path-utils does. No review comments appear in the excerpts.
