Thread (11 messages) flat view 11 messages, 6 authors, 2016-06-15

Re: git should not use a default user.email config value

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:58:23

Possibly related (same subject, not in this thread)

Hi Thorsten,

Thorsten Glaser wrote[1]:
git config user.email SHOULD NOT default to $(id -un)@$(hostname -f)
because just too many cow-orkers seem to be unable to follow basic
instructions
Heh.

Can you say a little more about your setup?  In a university
environment with sysadmin-managed email and /etc/mailname set up
correctly it is handy that people can start working without doing
anything special to configure git's "[user] email" setting.  On the
other hand it is obnoxious to receive patches with wrong authorship
information.  So I'm wondering if there's some detail that
distinguishes between these cases.

Incidentally, it's been a long time since I looked at the "Please
configure your email address; I've made something up, but you'll want
to check it" message:

	Your name and email address were configured automatically based
	on your username and hostname. Please check that they are accurate.
	You can suppress this message by setting them explicitly:

	    git config --global user.name "Your Name"
	    git config --global user.email you@example.com

	After doing this, you may fix the identity used for this commit with:

	    git commit --amend --reset-author

I wonder if it's too gentle and long to get the point across.  Would
something the following (including the guesses in the message for
easier copy-pasting) help?

	No name and email address configured, so I had to guess.  You
	can suppress this message by setting your identity explicitly:

		git config --global user.name "Thorsten Glaser"
		git config --global user.email tg@mirbsd.de

	After doing so, you may fix the identity used for this commit
	with "git commit --amend --reset-author".

It may also make sense to distinguish between cases where a mailname
is set and not set.  Git already notices the cases where the guessed
email address ends with ".(none)" and errors out, and it could make
sense to be more aggressive.

Hope that helps,
Jonathan

[1] http://bugs.debian.org/719226
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help