Skip to content

Commit 238803c

Browse files
avargitster
authored andcommitted
mailmap doc + tests: document and test for case-insensitivity
Add documentation and more tests for case-insensitivity. The existing test only matched on the E-Mail part, but as shown here we also match the name with strcasecmp(). This behavior was last discussed on the mailing list in the thread starting at [1]. It seems we're keeping it like this, so let's document it. 1. https://lore.kernel.org/git/[email protected]/ Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 34986b7 commit 238803c

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Documentation/gitmailmap.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ commit matching the specified commit email address, and:
4949
which allows mailmap to replace both the name and the email of a
5050
commit matching both the specified commit name and email address.
5151

52+
Both E-Mails and names are matched case-insensitively. For example
53+
this would also match the 'Commit Name <[email protected]>' above:
54+
--
55+
Proper Name <[email protected]> CoMmIt NaMe <[email protected]>
56+
--
5257

5358
EXAMPLES
5459
--------

t/t4203-mailmap.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,21 @@ test_expect_success 'name entry after email entry, case-insensitive' '
220220
initial
221221
222222
EOF
223+
git shortlog HEAD >actual &&
224+
test_cmp expect actual &&
225+
226+
cat >internal.map <<-\EOF &&
227+
228+
EOF
229+
230+
cat >expect <<-\EOF &&
231+
NiCk (1):
232+
second
233+
234+
Repo Guy (1):
235+
initial
223236
237+
EOF
224238
git shortlog HEAD >actual &&
225239
test_cmp expect actual
226240
'

0 commit comments

Comments
 (0)