Re: [GSOC PATCH v5 3/3] environment: remove the global variable 'sparse_expect_files_outside_of_patterns'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux