ident: do not ignore empty config name/email
commit94425552f308946456bb7823d0a1dd72ebd30bdd
authorJeff King <peff@peff.net>
Thu, 23 Feb 2017 08:17:08 +0000 (23 03:17 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Feb 2017 20:58:47 +0000 (23 12:58 -0800)
tree84bb2ac31b5f4e405d77adf28a08806e36edc5a2
parent13b9a24e58f736b70e48846cf7e5b7cfa66c3fec
ident: do not ignore empty config name/email

When we read user.name and user.email from a config file,
they go into strbufs. When a caller asks ident_default_name()
for the value, we fallback to auto-detecting if the strbuf
is empty.

That means that explicitly setting an empty string in the
config is identical to not setting it at all. This is
potentially confusing, as we usually accept a configured
value as the final value.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ident.c
t/t7518-ident-corner-cases.sh