summaryrefslogtreecommitdiff
path: root/mailinfo.c
diff options
context:
space:
mode:
authoredef <edef@edef.eu>2021-05-16 15:07:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-05-16 22:35:43 (GMT)
commit72ee47ceebc7d3ddbd31942b28f9fe47f00b0540 (patch)
tree3d15ee5826627ca5719fd753d516757a8e80aa9f /mailinfo.c
parent48bf2fa8bad054d66bd79c6ba903c89c704201f7 (diff)
downloadgit-72ee47ceebc7d3ddbd31942b28f9fe47f00b0540.zip
git-72ee47ceebc7d3ddbd31942b28f9fe47f00b0540.tar.gz
git-72ee47ceebc7d3ddbd31942b28f9fe47f00b0540.tar.bz2
mailinfo: don't discard names under 3 characters
I sometimes receive patches from people with short mononyms, and in my cultural environment these are not uncommon. To my dismay, git-am currently discards their names, and replaces them with their email addresses. Link: https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ Signed-off-by: edef <edef@edef.eu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'mailinfo.c')
-rw-r--r--mailinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mailinfo.c b/mailinfo.c
index 5681d91..3161a39 100644
--- a/mailinfo.c
+++ b/mailinfo.c
@@ -19,7 +19,7 @@ static void cleanup_space(struct strbuf *sb)
static void get_sane_name(struct strbuf *out, struct strbuf *name, struct strbuf *email)
{
struct strbuf *src = name;
- if (name->len < 3 || 60 < name->len || strpbrk(name->buf, "@<>"))
+ if (!name->len || 60 < name->len || strpbrk(name->buf, "@<>"))
src = email;
else if (name == out)
return;