# Configuration file musings

2 messages from 2006-02-12 to 2006-02-12. Participants: Mark Wooding, Junio C Hamano.
Thread: https://gitlist.dev/t/3308

## Mark Wooding, 2006-02-12 13:45

Subject: Configuration file musings
Message-ID: <slrnduuf08.518.mdw@metalzone.distorted.org.uk>
URL: https://gitlist.dev/e/slrnduuf08.518.mdw%40metalzone.distorted.org.uk

```
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.

  * User configuration: basically, how I like GIT to work for me.  I
    think that the way it represents my name in commit messages is user
    configuration, as would be the behaviour of `git-commit PATH'.
    Environment variables almost work for this, but they're a nuisance
    to change.  This stuff ought to be somewhere in my home directory,
    probably; though it would be useful to override temporarily, or on a
    per-repository basis.

  * Project configuration: how GIT should be supporting a particular
    project.  The merge.summary flag is like this, I think: whether to
    have summaries in merge messages is a policy decision to be taken
    for a whole project, rather than something to be left to the whims
    of individual developers.  Such settings probably to be propagated
    through git-clone, git-fetch and so on.

  * True repository configuration: how this particular repository ought
    to behave.  I can't think of many examples off the top of my head,
    but core.repositoryformatversion and core.filemode are the sorts of
    things I'm thinking of.

I'm not entirely sure where I'm going with this at the moment, and I
don't like some of the complexity which seems inherent in doing anything
about it, but I thought I'd stick my oar in anyway.

-- [mdw]

```

## Junio C Hamano, 2006-02-12 18:56

Subject: Re: Configuration file musings
Message-ID: <7v4q34be2z.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v4q34be2z.fsf%40assigned-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.

```
