Re: [PATCH v2] mailinfo: don't discard names under 3 characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



edef <edef@xxxxxxx> writes:

> 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@xxxxxxx>
> ---
> Rebased and with Signed-off-by this time :)
>
>  mailinfo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mailinfo.c b/mailinfo.c
> index 95ce191f38..626228654c 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;

Wow.  The original of this was from very late in 2019, wasn't it?

Thanks for updating; will queue.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux