On Tue, Jul 1, 2025 at 6:48 PM Phillip Wood <phillip.wood123@xxxxxxxxx> wrote: > > Hi Ayush Hi Phillip, > > 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 > Yes, I get your point. However, if we look at settings which are shifted to `struct repo_settings`, the behaviour is to set a fallback/default value in case of an invalid input, instead of throwing an error. This is done inside the `prepare_repo_settings()` function, which is often called in the middle of a process. Thanks Ayush:)