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/87czykvg19.fsf@evledraar.gmail.com/ Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Jan 12, 2021 at 21:18 UTC 238803cb409930a9cbbe911917b28817d182330e
2 files changed +19
Documentation/gitmailmap.txt
+5
@@ -49,6 +49,11 @@ commit matching the specified commit email address, and:
49 which allows mailmap to replace both the name and the email of a
50 commit matching both the specified commit name and email address.
51
52 +Both E-Mails and names are matched case-insensitively. For example
53 +this would also match the 'Commit Name <commit@email.xx>' above:
54 +--
55 +Proper Name <proper@email.xx> CoMmIt NaMe <CoMmIt@EmAiL.xX>
56 +--
57
58 EXAMPLES
59 --------
t/t4203-mailmap.sh
+14
@@ -220,7 +220,21 @@ test_expect_success 'name entry after email entry, case-insensitive' '
220 initial
221
222 EOF
223 + git shortlog HEAD >actual &&
224 + test_cmp expect actual &&
225 +
226 + cat >internal.map <<-\EOF &&
227 + NiCk <BuGs@CoMpAnY.Xy> NICK1 <BUGS@COMPANY.XX>
228 + EOF
229 +
230 + cat >expect <<-\EOF &&
231 + NiCk (1):
232 + second
233 +
234 + Repo Guy (1):
235 + initial
236
237 + EOF
238 git shortlog HEAD >actual &&
239 test_cmp expect actual
240 '