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

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

From: Michael Haggerty <hidden>
Date: 2016-06-15 22:58:23

Possibly related (same subject, not in this thread)

On 08/10/2013 12:28 PM, Jeff King wrote:
On Sat, Aug 10, 2013 at 11:59:21AM +0200, Michael Haggerty wrote:
quoted
On 08/10/2013 08:47 AM, Jeff King wrote:
quoted
But I think MX records and deliverability is beside the point. Even in a
case where we come up with a valid, deliverable address, is that what
the user wants to have in their commit history for all time?
I intentionally don't set user.email in my ~/.gitconfig because I use
different identities (on the same machine) depending on what project I
am committing to (open-source vs. work).  After I clone a repo, I *rely*
on Git reminding me to set user.email on my first commit, because I
invariably forget to set it myself.  And for me, *any* universal,
heuristically-determined email address would be wrong for me for at
least some repos.
So if I understand your use case, then you would be even happier if
rather than giving a warning, git simply barfed and said "please set
your identity before committing"?
Yes, definitely.

For the particular use case that I described, I wouldn't mind setting a
global setting "barfOnMissingEmail = true" because I always use the same
Linux account.  But for other uses cases that arise at my company,
people have to jump around from one computer to another, and it would be
more convenient if the barfing behavior was the default without the need
for a setting.

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help