]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t4203: demonstrate loss of uppercase characters in canonical email
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 15 Jul 2013 06:54:07 +0000 (02:54 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 15 Jul 2013 15:16:32 +0000 (08:16 -0700)
The email addresses read from .mailmap are downcased before being
inserted into the mailmap data structure, which undesirably loses
information.  It is impossible, for instance, to map <first.last@host>
to <First.Last@host>. Demonstrate this problem.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4203-mailmap.sh

index 8583724375134253c1054f3d8e683bfaba7c6275..ffe6a11ac09105e945f43575060b520c65627d60 100755 (executable)
@@ -256,6 +256,15 @@ test_expect_success 'single-character name' '
        test_cmp expect actual
 '
 
+test_expect_failure 'preserve canonical email case' '
+       echo "     1    A U Thor <AUTHOR@example.com>" >expect &&
+       echo "     1    nick1 <bugs@company.xx>" >>expect &&
+       echo "<AUTHOR@example.com> <author@example.com>" >.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 <author@example.com> (1):