]> git.ipfire.org Git - thirdparty/git.git/commit
ident: keep a flag for bogus default_email
authorJeff King <peff@peff.net>
Thu, 10 Dec 2015 21:35:36 +0000 (16:35 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Dec 2015 23:39:25 +0000 (15:39 -0800)
commit19ce497cf594a3c01af33a65b27b19e7459212d6
treeb61f8774e2d24f9991f05b50d461bd64db58fb8b
parente850194c83985396435b01b70d2db00b6d3af02e
ident: keep a flag for bogus default_email

If we have to deduce the user's email address and can't come
up with something plausible for the hostname, we simply
write "(none)" or ".(none)" in the hostname.

Later, our strict-check is forced to use strstr to look for
this magic string. This is probably not a problem in
practice, but it's rather ugly. Let's keep an extra flag
that tells us the email is bogus, and check that instead.

We could get away with simply setting the global in
add_domainname(); it only gets called to write into
git_default_email. However, let's make the code a little
more obvious to future readers by actually passing a pointer
to our "bogus" flag down the call-chain.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ident.c