git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Mark Wooding <mdw@distorted.org.uk>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] config: Rummage through ~/.gitrc as well as the repository's config.
Date: Sat, 04 Feb 2006 04:17:48 -0800	[thread overview]
Message-ID: <7vhd7f1fo3.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <slrndu9042.2i8.mdw@metalzone.distorted.org.uk> (Mark Wooding's message of "Sat, 4 Feb 2006 10:22:58 +0000 (UTC)")

Mark Wooding <mdw@distorted.org.uk> writes:

> Argh.  In every terminal and screen window, restart Emacs, ...  Logging
> out looks like the better plan.

So you do mean environment variables?  Then what's the aversion
against using GIT_AUTHOR_EMAIL instead of using user.email in
every repository?  If you use the same value everywhere, you
can do the environment thing _today_ and re-logging in needs to
be done only once, so I do not find it such a big deal.  If you
do _not_ use the same value everywhere, then user.email per
repository is a good thing to have, but ~/.gitrc would not help.

Having said that, there are good uses for per-user configuration
that is used across different repositories.  Especially when we
start adding new features, we would not want to invent new
environment variable every time.  Under ~/ would be a logical
place to put that information.

If you want to propose a search order of multiple configuration
files and how they interact with each other (what happens if
~/.gitrc and $GIT_DIR/config say different things, especially
for multi-valued configuration items), go wild.  I think the
simplest single-value cases should be resolved by taking what
$GIT_DIR/config says and if the configuration is not found there
then look at ~/.gitrc (IOW, $GIT_DIR/config takes precedence),
but I am not sure even if that is true in general.  I suspect
that some configuration items are more of personal nature and
some configuration items are more of per-project attribute.  For
example, merge resolve strategy would be affected more by the
nature of changes that happen to the project's files than which
strategy the user feels easier to work with; $GIT_DIR/config may
have core.gitproxy and user.email, maybe by historical reasons,
which you may rather want to override with ~/.gitrc (e.g. git
proxy may require proxy authentication which would need to be
supplied per user).

Especially problematic would be user.email.  Some people might
want to use different identity depending on what project they
work on, in which case they would want $GIT_DIR/config to take
precedence.  But sometimes you may need to go to your colleagues
repository and help him with his work, and when you make a
commit there you would want your name, not user.email in
$GIT_DIR/config that records his identity, to be used for that
commit.

      reply	other threads:[~2006-02-04 12:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-03 20:33 [PATCH] config: Rummage through ~/.gitrc as well as the repository's config Mark Wooding
2006-02-04  1:15 ` Junio C Hamano
2006-02-04 10:22   ` Mark Wooding
2006-02-04 12:17     ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vhd7f1fo3.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=mdw@distorted.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).