Re: [PATCH] Provide config option to expect files outside sparse patterns
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 21, 2022, 20:34 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2202212100080.4418@tvgsbejvaqbjf.bet>
- In-Reply-To
- <pull.1153.git.1645333542011.gitgitgadget@gmail.com>
Hi Elijah,
In addition to Stolee's feedback...
On Sun, 20 Feb 2022, Elijah Newren via GitGitGadget wrote:
Show 12 quoted lines
> 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`?
Ciao, Dscho