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

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

 



On Mon, Feb 21, 2022 at 12:34 PM Johannes Schindelin
<Johannes.Schindelin@xxxxxx> wrote:
>
> 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`?

That's a fair point.  At one point Stolee wanted to change from
core.sparse* to sparse.* -- but by that point we already had users and
would have had to deal with a bit of a migration story (and wondering
what to do if people had both old and new config variables set
inconsistently).

I'm not sure if it's optimal to try to keep the sparse settings
together (thus put new ones under core), or try to avoid filling core.
I guess if we moved towards sparse.* now, it might be an easier
migration story if we only have two options to move.  And besides,
we're already split between multiple sections with
extensions.worktreeConfig, core.sparseCheckout{,Cone}, and
index.sparse already...so maybe adding one more section would be par
for the course.  ;-)

So, I'm leaning towards sparse.expectFilesOutsideOfPatterns, but I'd
like to hear Stolee's thoughts too.



[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