From: Junio C Hamano Date: Thu, 17 Oct 2013 22:45:51 +0000 (-0700) Subject: Merge branch 'ap/commit-author-mailmap' into maint X-Git-Tag: v1.8.4.2~19 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/87b24a42eae8f33ccf28d0babbe91f0262feb7dc?ds=inline;hp=-c Merge branch 'ap/commit-author-mailmap' into maint * ap/commit-author-mailmap: commit: search author pattern against mailmap --- 87b24a42eae8f33ccf28d0babbe91f0262feb7dc diff --combined t/t4203-mailmap.sh index ce3eace065,4d715f058c..0dd8b65d7c --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@@ -202,8 -202,7 +202,8 @@@ test_expect_success 'setup mailmap blo Blob Guy Blob Guy EOF - git add just-bugs both && + printf "Tricky Guy " >no-newline && + git add just-bugs both no-newline && git commit -m "my mailmaps" && echo "Repo Guy " >.mailmap && echo "Internal Guy " >internal.map @@@ -287,19 -286,6 +287,19 @@@ test_expect_success 'mailmap.blob defau ) ' +test_expect_success 'mailmap.blob can handle blobs without trailing newline' ' + cat >expect <<-\EOF && + Tricky Guy (1): + initial + + nick1 (1): + second + + EOF + git -c mailmap.blob=map:no-newline shortlog HEAD >actual && + test_cmp expect actual +' + test_expect_success 'cleanup after mailmap.blob tests' ' rm -f .mailmap ' @@@ -484,4 -470,15 +484,15 @@@ test_expect_success 'Blame output (comp test_cmp expect actual.fuzz ' + cat >expect <<\EOF + Some Dude + EOF + + test_expect_success 'commit --author honors mailmap' ' + test_must_fail git commit --author "nick" --allow-empty -meight && + git commit --author "Some Dude" --allow-empty -meight && + git show --pretty=format:"%an <%ae>%n" >actual && + test_cmp expect actual + ' + test_done