From 238803cb409930a9cbbe911917b28817d182330e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 12 Jan 2021 21:18:05 +0100 Subject: mailmap doc + tests: document and test for case-insensitivity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano diff --git a/Documentation/gitmailmap.txt b/Documentation/gitmailmap.txt index 55dfebd..7f10897 100644 --- a/Documentation/gitmailmap.txt +++ b/Documentation/gitmailmap.txt @@ -49,6 +49,11 @@ commit matching the specified commit email address, and: which allows mailmap to replace both the name and the email of a commit matching both the specified commit name and email address. +Both E-Mails and names are matched case-insensitively. For example +this would also match the 'Commit Name ' above: +-- +Proper Name CoMmIt NaMe +-- EXAMPLES -------- diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index f19736f..89cb300 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -220,7 +220,21 @@ test_expect_success 'name entry after email entry, case-insensitive' ' initial EOF + git shortlog HEAD >actual && + test_cmp expect actual && + + cat >internal.map <<-\EOF && + NiCk NICK1 + EOF + + cat >expect <<-\EOF && + NiCk (1): + second + + Repo Guy (1): + initial + EOF git shortlog HEAD >actual && test_cmp expect actual ' -- cgit v0.10.2-6-g49f6