Jim Meyering wrote: > Signed-off-by: Jim Meyering <meyering@xxxxxxxxxx> Applies to maint, too --- confirmed with the tests below (both fail before, pass after). Thanks. Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx> --- t/t4203-mailmap.sh | 40 +++++++++++++++++++++++++++++++++++++--- 1 files changed, 37 insertions(+), 3 deletions(-) diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index 9a7d1b4..3c5188f 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -54,7 +54,7 @@ Repo Guy (1): EOF test_expect_success 'mailmap.file set' ' - mkdir internal_mailmap && + mkdir -p internal_mailmap && echo "Internal Guy <bugs@xxxxxxxxxx>" > internal_mailmap/.mailmap && git config mailmap.file internal_mailmap/.mailmap && git shortlog HEAD >actual && @@ -93,6 +93,40 @@ test_expect_success 'mailmap.file non-existant' ' ' cat >expect <<\EOF +Internal Guy (1): + second + +Repo Guy (1): + initial + +EOF + +test_expect_success 'name entry after email entry' ' + mkdir -p internal_mailmap && + echo "<bugs@xxxxxxxxxx> <bugs@xxxxxxxxxx>" >internal_mailmap/.mailmap && + echo "Internal Guy <bugs@xxxxxxxxxx>" >>internal_mailmap/.mailmap && + git shortlog >actual && + test_cmp expect actual +' + +cat >expect <<\EOF +Internal Guy (1): + second + +Repo Guy (1): + initial + +EOF + +test_expect_success 'name entry after email entry, case-insensitive' ' + mkdir -p internal_mailmap && + echo "<bugs@xxxxxxxxxx> <bugs@xxxxxxxxxx>" >internal_mailmap/.mailmap && + echo "Internal Guy <BUGS@xxxxxxxxxx>" >>internal_mailmap/.mailmap && + git shortlog >actual && + test_cmp expect actual +' + +cat >expect <<\EOF A U Thor (1): initial @@ -101,7 +135,7 @@ nick1 (1): EOF test_expect_success 'No mailmap files, but configured' ' - rm .mailmap && + rm -f .mailmap internal_mailmap/.mailmap && git shortlog HEAD >actual && test_cmp expect actual ' @@ -153,7 +187,7 @@ test_expect_success 'Shortlog output (complex mapping)' ' test_tick && git commit --author "CTO <cto@xxxxxxxxxxx>" -m seventh && - mkdir internal_mailmap && + mkdir -p internal_mailmap && echo "Committed <committer@xxxxxxxxxxx>" > internal_mailmap/.mailmap && echo "<cto@xxxxxxxxxx> <cto@xxxxxxxxxxx>" >> internal_mailmap/.mailmap && echo "Some Dude <some@xxxxxxx> nick1 <bugs@xxxxxxxxxx>" >> internal_mailmap/.mailmap && -- 1.7.2.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html