From: Josh Triplett <josh@freedesktop.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: mkraai@beckman.com, git@vger.kernel.org
Subject: Re: Email address from username and hostname preferred over $EMAIL
Date: Thu, 05 Jul 2007 20:44:21 -0700 [thread overview]
Message-ID: <468DBA95.3070101@freedesktop.org> (raw)
In-Reply-To: <alpine.LFD.0.98.0707051357360.9434@woody.linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]
Linus Torvalds wrote:
> On Thu, 5 Jul 2007, mkraai@beckman.com wrote:
>> Git prefers to use an email address constructed from the username and
>> hostname to the value of the EMAIL environment variable. I think it
>> should prefer the latter to the former. This problem was introduced by
>> ec563e8153cba89728a271a26c8a94e7a42d8152.
>
> It did that very much on purpose. "git_default_email" must take
> precedence, because that's the one that is filled in by the config file
> syntax.
>
> So just use
>
> [user]
> name = ..
> email = ..
>
> and be happy. Only in the absense of that will git start guessing, and
> yeah, it will not generally use EMAIL, unless it cannot get anything at
> all from username/hostname.
>
> If you want it to prefer $EMAIL, you'd need to change the initialization
> of git_default_email, methinks.
When I originally wrote the patch, I did so intending that $EMAIL would always
override git's guess of user@hostname. I set GIT_{AUTHOR,COMMITTER}_EMAIL in
my environment specifically so that git would stop using guesses like
josh@josh-mobile and start using my actual email address. I submitted the
$EMAIL patch in hopes that eventually I could stop setting the git-specific
email addresses and just set $EMAIL, which I already do for other tools. In
order for that to work, $EMAIL should always override git's guesses.
- Josh Triplett
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
prev parent reply other threads:[~2007-07-06 3:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <OF40A04FE5.AA34B1BF-ON8825730F.005D733A-8825730F.0062A716@beck man.com>
2007-07-05 17:57 ` Email address from username and hostname preferred over $EMAIL mkraai
2007-07-05 20:21 ` Pierre Habouzit
2007-07-05 20:48 ` mkraai
2007-07-05 21:10 ` Linus Torvalds
2007-07-06 0:49 ` Brandon Casey
2007-07-06 1:17 ` Junio C Hamano
2007-07-06 15:02 ` Brandon Casey
2007-07-06 3:44 ` Josh Triplett [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=468DBA95.3070101@freedesktop.org \
--to=josh@freedesktop.org \
--cc=git@vger.kernel.org \
--cc=mkraai@beckman.com \
--cc=torvalds@linux-foundation.org \
/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).