Skip to content

Commit

Permalink
t4203: demonstrate loss of uppercase characters in canonical email
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sunshine authored and Junio C Hamano committed Jul 15, 2013
1 parent 8c38115 commit 3aff56d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions t/t4203-mailmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 3aff56d

Please sign in to comment.