git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Provide config option to expect files outside sparse patterns

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Feb 21, 2022, 22:53 UTC
Message-ID
<220221.86a6ejakun.gmgdl@evledraar.gmail.com>
In-Reply-To
<nycvar.QRO.7.76.6.2202212100080.4418@tvgsbejvaqbjf.bet>
On Mon, Feb 21 2022, Johannes Schindelin wrote:
Show 25 quoted lines
> Hi Elijah,
>
> In addition to Stolee's feedback...
>
> On Sun, 20 Feb 2022, Elijah Newren via GitGitGadget wrote:
>
>> diff --git a/config.c b/config.c
>> index 2bffa8d4a01..68e877a1d80 100644
>> --- a/config.c
>> +++ b/config.c
>> @@ -1520,6 +1520,11 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
>>  		return 0;
>>  	}
>>
>> +	if (!strcmp(var, "core.expectfilesoutsidesparsepatterns")) {
>> +		core_expect_files_outside_sparse_patterns = git_config_bool(var, value);
>> +		return 0;
>> +	}
>
> The `core` section is already quite crowded (for which I am partially
> responsible, of course).
>
> Maybe it would be a good idea to introduce the `sparse` section, using
> `sparse.allowFilesMatchingPatterns` or `sparse.applyPatternsToWorktree =
> false`?

There's a large list of exceptions to this, but generally we have core.* for cross-command configuration, and <cmd>.* for command-specific configuration.

Excetions include http.*, mailmap.*, pack.* (arguably), trace2.*.

In this case though we have 2x /^core\.sparse[A-Z].*/ variables in git-config(1) already.

So perhaps we could name it like that, then at least you'd find all of these in the same place when looking through that documentation, although a name starting with "core.sparse" might not be otherwise ideal.

There's also no law that says we can't have a three-level variable as core.sparse.*, perhaps that would be the start of a good trend, and it would sort adjacent to core.sparse[A-Z].* ...

Previous: Johannes SchindelinNext: Elijah Newren
Message 8 of 29 in “Provide config option to expect files outside sparse patterns”
  1. Provide config option to expect files outside sparse patternsElijah Newren via GitGitGadget, Feb 20, 2022
  2. Derrick StoleeFeb 20, 2022
  3. Junio C HamanoFeb 20, 2022
  4. Elijah NewrenFeb 22, 2022
  5. Johannes SchindelinFeb 22, 2022
  6. Derrick StoleeFeb 22, 2022
  7. Johannes SchindelinFeb 21, 2022
  8. Ævar Arnfjörð BjarmasonFeb 21, 2022
  9. Elijah NewrenFeb 22, 2022
  10. Johannes SchindelinFeb 22, 2022
  11. Ævar Arnfjörð BjarmasonFeb 22, 2022
  12. Jonathan NiederFeb 22, 2022
  13. Ævar Arnfjörð BjarmasonFeb 25, 2022
  14. Elijah NewrenFeb 22, 2022
  15. Ævar Arnfjörð BjarmasonFeb 22, 2022
  16. Johannes SchindelinFeb 22, 2022
  17. Derrick StoleeFeb 22, 2022
  18. repo_read_index: add config to expect files outside sparse patternsJonathan Nieder, Feb 23, 2022
  19. Elijah NewrenFeb 23, 2022
  20. repo_read_index: add config to expect files outside sparse patternsElijah Newren, Feb 24, 2022
  21. Junio C HamanoFeb 24, 2022
  22. Elijah NewrenFeb 26, 2022
  23. Jonathan NiederFeb 25, 2022
  24. Elijah NewrenFeb 26, 2022
  25. repo_read_index: add config to expect files outside sparse patternsElijah Newren, Feb 26, 2022
  26. repo_read_index: add config to expect files outside sparse patternsElijah Newren, Mar 2, 2022
  27. Junio C HamanoMar 2, 2022
  28. Elijah NewrenMar 2, 2022
  29. Derrick StoleeMar 2, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.