Hi Ayush On 30/06/2025 20:27, Ayush Chandekar wrote:
void clear_skip_worktree_from_present_files(struct index_state *istate) { + int sparse_expect_files_outside_of_patterns = 0; + repo_config_get_bool(istate->repo, "sparse.expectfilesoutsideofpatterns", + &sparse_expect_files_outside_of_patterns);
This changes the user facing behavior if sparse.expectfilesoutsideofpatterns is not a valid boolean value. Currently git will error out when it first starts because that config value is parsed by git_default_config() which is called by almost all git commands. This means that if someone sets an invalid value they get timely feedback that the value is invalid and git dies before doing anything. Now, if the value is invalid, git will only die if this function is called and it is likely to die in the middle of a command.
Thanks Phillip