From e6bb5f78fb351c89a80826befda3c8f06f91f249 Mon Sep 17 00:00:00 2001 From: Antoine Pelisse Date: Sat, 5 Jan 2013 22:26:46 +0100 Subject: log: add log.mailmap configuration option Teach "log.mailmap" configuration variable to turn "--use-mailmap" option on to "git log", "git show" and "git whatchanged". The "--no-use-mailmap" option from the command line can countermand the setting. Signed-off-by: Antoine Pelisse Signed-off-by: Junio C Hamano --- t/t4203-mailmap.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 't/t4203-mailmap.sh') diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index e16187fd17..7d4d31c830 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -254,6 +254,21 @@ test_expect_success 'Log output with --use-mailmap' ' test_cmp expect actual ' +cat >expect <<\EOF +Author: CTO +Author: Santa Claus +Author: Santa Claus +Author: Other Author +Author: Other Author +Author: Some Dude +Author: A U Thor +EOF + +test_expect_success 'Log output with log.mailmap' ' + git -c log.mailmap=True log | grep Author >actual && + test_cmp expect actual +' + cat >expect <<\EOF Author: Santa Claus Author: Santa Claus @@ -263,6 +278,15 @@ test_expect_success 'Grep author with --use-mailmap' ' git log --use-mailmap --author Santa | grep Author >actual && test_cmp expect actual ' +cat >expect <<\EOF +Author: Santa Claus +Author: Santa Claus +EOF + +test_expect_success 'Grep author with log.mailmap' ' + git -c log.mailmap=True log --author Santa | grep Author >actual && + test_cmp expect actual +' >expect -- cgit v1.2.1