Re: git should not use a default user.email config value
From: Matthieu Moy <hidden>
Date: 2016-06-15 22:58:24
Jonathan Nieder [off-list ref] writes:
Hi Thorsten, Thorsten Glaser wrote[1]:quoted
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 instructionsHeh. 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.
I also work with a university environment. The guessed user.email is
almost right (actually, it's not the official email address, but an
internal one we ask students not to use). Still, I'd love to see Git
error out by default, as most students use Git from several machines.
They usually learn and write their first ~/.gitconfig on the school's
machines, and then start working from their personal laptops, where the
guessed user.email is plain wrong.
We do teach them to set user.email in ~/.gitconfig as a very first step,
but many don't (because they don't read the tutorial, or because they do
something wrong like putting .gitconfig in the wrong directory). We do
tell them to set up ~/.gitconfig on every host they work from, but many
don't either. And unfortunately, the warning is not scary enough for
some of them :-\ ("Err, did I get a warning? where?").
An opt-in auto-detection would be cool for people who really work in a
controlled environment, so that the sysadmin could enable it from
/etc/gitconfig.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/