3 test_description
='.mailmap configurations'
7 test_expect_success setup
'
11 git commit -m initial &&
14 git commit --author "nick1 <bugs@company.xx>" -m second
26 test_expect_success
'No mailmap' '
27 git shortlog HEAD >actual &&
28 test_cmp expect actual
40 test_expect_success
'default .mailmap' '
41 echo "Repo Guy <author@example.com>" > .mailmap &&
42 git shortlog HEAD >actual &&
43 test_cmp expect actual
46 # Using a mailmap file in a subdirectory of the repo here, but
47 # could just as well have been a file outside of the repository
56 test_expect_success
'mailmap.file set' '
57 mkdir internal_mailmap &&
58 echo "Internal Guy <bugs@company.xx>" > internal_mailmap/.mailmap &&
59 git config mailmap.file internal_mailmap/.mailmap &&
60 git shortlog HEAD >actual &&
61 test_cmp expect actual
72 test_expect_success
'mailmap.file override' '
73 echo "External Guy <author@example.com>" >> internal_mailmap/.mailmap &&
74 git config mailmap.file internal_mailmap/.mailmap &&
75 git shortlog HEAD >actual &&
76 test_cmp expect actual
88 test_expect_success
'mailmap.file non-existant' '
89 rm internal_mailmap/.mailmap &&
90 rmdir internal_mailmap &&
91 git shortlog HEAD >actual &&
92 test_cmp expect actual
103 test_expect_success
'No mailmap files, but configured' '
105 git shortlog HEAD >actual &&
106 test_cmp expect actual