Re: [PATCH 9/9] send-email: move trivial config handling to Perl

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

 



On Thu, May 13, 2021 at 02:04:08AM -0500, Felipe Contreras wrote:

> Jeff King wrote:
> > It is a bit unfortunate to have to go through these contortions, but
> > this is definitely the best we can do for now. I think in the long run
> > it would be nice to have a "--stdin" mode for git-config, where we could
> > do something like:
> > 
> >   git config --stdin <<\EOF
> >   key=foo.bar
> >   type=bool
> >   default=false
> > 
> >   key=another.key
> >   type=color
> >   default=red
> >   EOF
> 
> Why do we even have to specify the type? Shouldn't there be a registry
> of configurations (a schema), so that all users don't have to do this?

One of the purposes of git-config is to serve third-party scripts that
store their own config keys that Git does not know about. So we can't
know the set of all possible types that will be asked about.

Obviously we could have git-config know internally about all of the keys
other parts of Git would ask about. But generally we have pushed that
knowledge out to the users of the keys, rather than any kind of central
registry.

-Peff



[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