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

Re: git-config(1) should mention `git -c`

From
Jeff King <peff@peff.net>
Date
Aug 23, 2016, 21:41 UTC
Message-ID
<20160823214120.ekaq4mul3pamweej@sigill.intra.peff.net>
In-Reply-To
<xmqqpoozwgm5.fsf@gitster.mtv.corp.google.com>
On Tue, Aug 23, 2016 at 10:16:18AM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > That seems like the most sensible place, as that is where we should
> > cover the order of reading and precedence. Perhaps FILES should be
> > renamed to SOURCES or something (though I do not recall if we are
> > restricted to "usual" manpage section names or not).
> >
> > Arguably this is not about git-config the program at all, but the
> > general concept of "configuration for git", because the precedence rules
> > apply equally to all of the git programs that read config.
> 
> True, but that argument leads us to say git(1) is the best place ;-)
Sort of. I agree it is a good place to mention the precedence, but...
Show 7 quoted lines
> If the user wants to know "how does the configuration values get
> read?", and wishes not having to go around fishing for the
> information in multiple places (and I think that is a reasonable
> thing to wish for), I think adding it to the FILES section of
> git-config(1) is a better option than inventing a separate
> gitconfig(7), which would still require the user to consult two
> places.

The flip side of "fishing for the information in multiple places" is "I know it is somewhere in git-config(1), but I have to wade through a bunch of cruft about git-config command-line options to find it".

So I'd argue that the concept of config (overview, precedence, file syntax, list of options) could be separate from both git-config(1) and from git(1), and that both of those places could point to it. That introduces a level of indirection which is annoying the first time ("I am reading git-config(1), but now I have to jump to another manpage") but helpful the other times ("I know I want config concepts, not the config tool; I can immediately jump to the right place").

Anyway. Just my two cents on the matter. I think we can improve David's complaint without anything so drastic.

-Peff
Previous: David Glasser
Message 5 of 5 in “git-config(1) should mention `git -c`”
  1. David GlasserAug 22, 2016
  2. Jeff KingAug 22, 2016
  3. Junio C HamanoAug 23, 2016
  4. David GlasserAug 23, 2016
  5. Jeff KingAug 23, 2016

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.