Re: gitconfig includes
- From
Eli Barzilay <eli@barzilay.org>
- Date
- Nov 30, 2016, 19:42 UTC
- Message-ID
- <CALO-guvsVgHp41ubvuKzmH3c4rE+3io3GaYie3=Q-4jdG91CDQ@mail.gmail.com>
- In-Reply-To
- <20161130190653.kk5pboas54yen2it@sigill.intra.peff.net>
On Wed, Nov 30, 2016 at 2:06 PM, Jeff King <peff@peff.net> wrote:
Show 11 quoted lines
> > I'm not sure what your script does exactly, but in general I think the > right thing for most scripts is _not_ to use a specific-file option > like --global. > > If the script is looking up a config value on behalf of a user, it > probably makes sense for it to use the normal config lookup procedure > (system, global, repo, command-line), which also enables includes by > default. That would make it consistent with internal git config > lookups (e.g., user.name probably only ever appears in global config, > but you _can_ override it at the repo level if you want to).
This is intended for git newbies (and big company => infinite supply of them), and also allows them to conveniently nuke the repo and start from a fresh copy, so it makes sense to make the script inspect/tweak the global settings. If knowing git "well enough" was an assumed requirement, I'd definitely do the normal thing.
> I know that's mostly orthogonal to what we're discussing, but I'd feel > more convinced that enabling "--includes" with "--global" is useful if > I thought that "--global" was useful in the first place outside of a > few narrow debugging cases.
Ok. Perhaps I overestimated the utility of --global anyway, given the above...
--
((x=>x(x))(x=>x(x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!