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

Re: Configuration file musings

From
Junio C Hamano <junkio@cox.net>
Date
Feb 12, 2006, 18:56 UTC
Message-ID
<7v4q34be2z.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<slrnduuf08.518.mdw@metalzone.distorted.org.uk>
Mark Wooding <mdw@distorted.org.uk> writes:
> Having thought about things a bit, I've reached the conclusion that the
> configuration file $GIT_DIR/config is trying to hold (at least) three
> entirely different kinds of configuration.

Yes. I've been somewhat bothered by that, but I did not ramble on it too much because I could not say what exactly is _wrong_ to have these things in the same file.

Except perhaps that pure user configuration could be further split out from per-repository user configuration to .gitconfig under $HOME or something like that. The former is things like "I am Junio C Hamano no matter which project I work on" the latter is for example "The e-mail address I use for this project is <junkio@cox>". But once we start dealing with more than one configuration file, you need one file taking precedence over the other and it appeared there is no single _right_ order. The above identity case is an example that it is better to make the config in repository to override $HOME one, but if you think long enough I am sure you can come up with an example that you would want to override repository one from $HOME one.

Previous: Mark Wooding
Message 2 of 2 in “Configuration file musings”
  1. Mark WoodingFeb 12, 2006
  2. Junio C HamanoFeb 12, 2006

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.