The new option '--use-mailmap' can be used to make
sure that mailmap file is used to convert name
when running log commands.

The test is simple and checks that the Author line
is correctly replaced when running log.

Signed-off-by: Antoine Pelisse <[email protected]>
---
 t/t4203-mailmap.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index 1f182f6..db043dc 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -239,6 +239,20 @@ test_expect_success 'Log output (complex mapping)' '
        test_cmp expect actual
 '
 
+cat >expect <<\EOF
+Author: CTO <[email protected]>
+Author: Santa Claus <[email protected]>
+Author: Santa Claus <[email protected]>
+Author: Other Author <[email protected]>
+Author: Other Author <[email protected]>
+Author: Some Dude <[email protected]>
+Author: A U Thor <[email protected]>
+EOF
+test_expect_success 'Log output with --use-mailmap' '
+       git log --use-mailmap | grep Author >actual &&
+       test_cmp expect actual
+'
+
 # git blame
 cat >expect <<\EOF
 ^OBJI (A U Thor     DATE 1) one
-- 
1.7.12.4.3.g2036a08.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to