Re: [PATCH 0/2] Introduce ~/.gitconfig
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)