From: Eric Sunshine Date: Mon, 15 Jul 2013 06:54:05 +0000 (-0400) Subject: t4203: demonstrate loss of single-character name in mailmap entry X-Git-Tag: v1.8.4-rc0~34^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=109025b4e1c836fb62752f69f24e8f11403760d5;p=git t4203: demonstrate loss of single-character name in mailmap entry A bug in mailmap.c:parse_name_and_email() causes it to overlook the single-character name in "A " and parse it only as "". Demonstrate this problem. Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index 842b7549ec..27f8f86ea7 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -247,6 +247,15 @@ test_expect_success 'cleanup after mailmap.blob tests' ' rm -f .mailmap ' +test_expect_failure 'single-character name' ' + echo " 1 A " >expect && + echo " 1 nick1 " >>expect && + echo "A " >.mailmap && + test_when_finished "rm .mailmap" && + git shortlog -es HEAD >actual && + test_cmp expect actual +' + # Extended mailmap configurations should give us the following output for shortlog cat >expect <<\EOF A U Thor (1):