git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Email address from username and hostname preferred over $EMAIL
@ 2007-07-05 17:57 ` mkraai
  2007-07-05 20:21   ` Pierre Habouzit
  2007-07-05 21:10   ` Linus Torvalds
  0 siblings, 2 replies; 8+ messages in thread
From: mkraai @ 2007-07-05 17:57 UTC (permalink / raw)
  To: git

Howdy,

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.

-- 
Matt

The server made the following annotations 
---------------------------------------------------------------------------------
This message contains information that may be privileged or confidential and is the property of Beckman Coulter, Inc. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

---------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Email address from username and hostname preferred over $EMAIL
  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
  1 sibling, 1 reply; 8+ messages in thread
From: Pierre Habouzit @ 2007-07-05 20:21 UTC (permalink / raw)
  To: mkraai; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 837 bytes --]

On Thu, Jul 05, 2007 at 10:57:37AM -0700, mkraai@beckman.com wrote:
> Howdy,
> 
> 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.

  no, ec563e8153cba89728a271a26c8a94e7a42d8152 is about making the
emails and usernames be taken from EMAIL iff there is none specified in
the different .gitconfig's (which is sane as $EMAIL is a system wide
default setting and that .git/config is definitely meant as an ovveride
of that setting).


-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Email address from username and hostname preferred over $EMAIL
  2007-07-05 20:21   ` Pierre Habouzit
@ 2007-07-05 20:48     ` mkraai
  0 siblings, 0 replies; 8+ messages in thread
From: mkraai @ 2007-07-05 20:48 UTC (permalink / raw)
  To: Pierre Habouzit; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 2055 bytes --]

Yes, ec563e8153cba89728a271a26c8a94e7a42d8152 made user.email take 
precedence over $EMAIL, but it also made the constructed email address 
take precedence over $EMAIL.  It made fmt_ident prefer git_default_email 
to $EMAIL, and git_default_email is set to the constructed email address 
by setup_ident if it's not already set by user.email.




Pierre Habouzit <madcoder@debian.org> 
07/05/2007 01:21 PM

To
mkraai@beckman.com
cc
git@vger.kernel.org
Subject
Re: Email address from username and hostname preferred over $EMAIL






On Thu, Jul 05, 2007 at 10:57:37AM -0700, mkraai@beckman.com wrote:
> Howdy,
> 
> 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.

  no, ec563e8153cba89728a271a26c8a94e7a42d8152 is about making the
emails and usernames be taken from EMAIL iff there is none specified in
the different .gitconfig's (which is sane as $EMAIL is a system wide
default setting and that .git/config is definitely meant as an ovveride
of that setting).


-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org


The server made the following annotations 
---------------------------------------------------------------------------------
This message contains information that may be privileged or confidential and is the property of Beckman Coulter, Inc. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

---------------------------------------------------------------------------------

[-- Attachment #2: atttv2u2.dat --]
[-- Type: application/octet-stream, Size: 196 bytes --]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBGjVLUvGr7W6HudhwRAi+OAKCbdSLx888s5fS1fuM1xAPgtISJqwCghh4B
0yRMdqfnMTea9jmP6jjZSLs=
=hYUo
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Email address from username and hostname preferred over $EMAIL
  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 21:10   ` Linus Torvalds
  2007-07-06  0:49     ` Brandon Casey
  2007-07-06  3:44     ` Josh Triplett
  1 sibling, 2 replies; 8+ messages in thread
From: Linus Torvalds @ 2007-07-05 21:10 UTC (permalink / raw)
  To: mkraai; +Cc: git



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.

		Linus

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Email address from username and hostname preferred over $EMAIL
  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  3:44     ` Josh Triplett
  1 sibling, 1 reply; 8+ messages in thread
From: Brandon Casey @ 2007-07-06  0:49 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: mkraai, git

Linus Torvalds wrote:

> If you want it to prefer $EMAIL, you'd need to change the initialization 
> of git_default_email, methinks.
> 
> 		Linus

I just sent an email to the list, and not in reply to this thread
because I thought I read a comment about not posting a patch deep in
a thread.

But, I'm thinking I should have just posted it as a reply to the thread
since I quoted a portion of your message.

-brandon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Email address from username and hostname preferred over $EMAIL
  2007-07-06  0:49     ` Brandon Casey
@ 2007-07-06  1:17       ` Junio C Hamano
  2007-07-06 15:02         ` Brandon Casey
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2007-07-06  1:17 UTC (permalink / raw)
  To: Brandon Casey; +Cc: Linus Torvalds, mkraai, git

Brandon Casey <casey@nrlssc.navy.mil> writes:

> Linus Torvalds wrote:
>
>> If you want it to prefer $EMAIL, you'd need to change the
>> initialization of git_default_email, methinks.
>>
>> 		Linus
>
> I just sent an email to the list, and not in reply to this thread
> because I thought I read a comment about not posting a patch deep in
> a thread.
>
> But, I'm thinking I should have just posted it as a reply to the thread
> since I quoted a portion of your message.

Are Brandon Casey and Matt Kraai the same person?

I do not mind threadedness of the patch too much, but the patch
recently posted by the latter does not have any description
other than the title.

Other than that, I think the change itself seems sane.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Email address from username and hostname preferred over $EMAIL
  2007-07-05 21:10   ` Linus Torvalds
  2007-07-06  0:49     ` Brandon Casey
@ 2007-07-06  3:44     ` Josh Triplett
  1 sibling, 0 replies; 8+ messages in thread
From: Josh Triplett @ 2007-07-06  3:44 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: mkraai, git

[-- 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 --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Email address from username and hostname preferred over $EMAIL
  2007-07-06  1:17       ` Junio C Hamano
@ 2007-07-06 15:02         ` Brandon Casey
  0 siblings, 0 replies; 8+ messages in thread
From: Brandon Casey @ 2007-07-06 15:02 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Linus Torvalds, mkraai, git

Junio C Hamano wrote:
> Brandon Casey <casey@nrlssc.navy.mil> writes:
> Are Brandon Casey and Matt Kraai the same person?

heh, no. :) I see now that my patch did not make it. I tried
to use git-send-email on my system and it successfully delivered
to my imap mailbox, but failed delivering to the other recipients.

> I do not mind threadedness of the patch too much

ok.

> , but the patch
> recently posted by the latter does not have any description
> other than the title.
> 
> Other than that, I think the change itself seems sane.

I'll go ahead and post my patch again since I think it is a
little simpler and I like it better (imagine that :)

But it's such a simple fix it will be just an exercise for me.

-brandon

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-07-06 15:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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 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).