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 <user@host>" and parse it only as "<user@host>". Demonstrate this problem. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Eric Sunshine committed
Jul 15, 2013 at 02:54 UTC
109025b4e1c836fb62752f69f24e8f11403760d5
1 file changed
+9
t/t4203-mailmap.sh
+9
@@ -247,6 +247,15 @@ test_expect_success 'cleanup after mailmap.blob tests' '
247
rm -f .mailmap
248
'
249
250
+test_expect_failure 'single-character name' '
251
+ echo " 1 A <author@example.com>" >expect &&
252
+ echo " 1 nick1 <bugs@company.xx>" >>expect &&
253
+ echo "A <author@example.com>" >.mailmap &&
254
+ test_when_finished "rm .mailmap" &&
255
+ git shortlog -es HEAD >actual &&
256
+ test_cmp expect actual
257
+'
258
+
259
# Extended mailmap configurations should give us the following output for shortlog
260
cat >expect <<\EOF
261
A U Thor <author@example.com> (1):