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

Re: [PATCH 0/2] Introduce ~/.gitconfig

From
Nikolai Weibull <now@bitwi.se>
Date
Jun 8, 2006, 13:13 UTC
Message-ID
<dbfc82860606080613n5b5f6a5bs7a8f461a4188228c@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.63.0606081415380.26091@wbgn013.biozentrum.uni-wuerzburg.de>
On 6/8/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Thu, 8 Jun 2006, Nikolai Weibull wrote:
> > On 6/8/06, Sven Ekman <svekman@yahoo.se> wrote:
> > > <Johannes.Schindelin@gmx.de> skrev:
> > > Have you considered making ~/.gitconfig a directory?
> > > Maybe Git wants to store more data later.
> > I second that.
> I don't. What's wrong with the simple approach of a single config file?
> You can use a single tool for all the configuration, and do not need to
> care about anything.

Who said anything about something more than one configuration file? It's nice to have a directory if we later decide to store other kinds of files there as well, e.g., templates or some keyring information or something else, perhaps not well-suited for storing in an ini-like file.

> > And it'd be nice if it was configurable through an environment variable,
> > e.g., GIT_USER_CONFIG_HOME.
> Let's see. AFAIK all programs I know (including cvs and vim, for
> one) have a fixed name. Hmm. Perhaps this is for a reason? Like, to reduce
> confusion?
That's hardly a very good reason.  It's not like you _have_ to use another name.

I keep as many configuration files as possible in ~/.local/etc/, as it simplifies keeping them in a Git repository. Here's an extract from my .zprofile:

XDG_CONFIG_HOME=~/.local/etc VIMINIT="so $XDG_CONFIG_HOME/vim/vimrc" INPUTRC=$XDG_CONFIG_HOME/inputrc INDENT_PROFILE=$XDG_CONFIG_HOME/indentrc SCREENRC=$XDG_CONFIG_HOME/screenrc GNUPGHOME=$XDG_CONFIG_HOME/gnupg IRBRC=$XDG_CONFIG_HOME/irbrc LFTP_HOME=$XDG_CONFIG_HOME/lftp MPLAYER_HOME=$XDG_CONFIG_HOME/mplayer GTK2_RC_FILES=$XDG_CONFIG_HOME/gtkrc

The only programs that don't play along, yet, are Mozilla, OpenSSH, and Subversion. (Mozilla is actually compile-time configurable.)

But I guess I should be providing a patch instead of just a bunch of reasoning for someone else to write one...

> Alternatively, we could introduce a config variable "core.globalConfig" to
> see where the global config is.

That is a very good idea. We wouldn't need an environment variable in that case.

  nikolai (who wonders if people can spot irony and sarcasm without extra help)
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 5 of 11 in “Introduce ~/.gitconfig”
  1. 0/2 Introduce ~/.gitconfigJohannes Schindelin, Jun 8, 2006
  2. SV: [PATCH 0/2] Introduce ~/.gitconfigSven Ekman, Jun 8, 2006
  3. Nikolai WeibullJun 8, 2006
  4. Johannes SchindelinJun 8, 2006
  5. Nikolai WeibullJun 8, 2006
  6. Johannes SchindelinJun 8, 2006
  7. Jon LoeligerJun 8, 2006
  8. Alex RiesenJun 8, 2006
  9. Johannes SchindelinJun 8, 2006
  10. Jakub NarebskiJun 8, 2006
  11. Johannes SchindelinJun 8, 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.