From f3eda90ffc10f9152e7492a34408a9f5e4c28b0f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 1 Aug 2019 14:48:34 -0700 Subject: log: really flip the --mailmap default Update the docs, test the interaction between the new default, configuration and command line option, in addition to actually flipping the default. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- t/t4203-mailmap.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 't') diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index 43b1522ea2..918ada69eb 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -442,6 +442,34 @@ test_expect_success 'Log output with log.mailmap' ' test_cmp expect actual ' +test_expect_success 'log.mailmap=false disables mailmap' ' + cat >expect <<-\EOF && + Author: CTO + Author: claus + Author: santa + Author: nick2 + Author: nick2 + Author: nick1 + Author: A U Thor + EOF + git -c log.mailmap=False log | grep Author > actual && + test_cmp expect actual +' + +test_expect_success '--no-use-mailmap disables mailmap' ' + cat >expect <<-\EOF && + Author: CTO + Author: claus + Author: santa + Author: nick2 + Author: nick2 + Author: nick1 + Author: A U Thor + EOF + git log --no-use-mailmap | grep Author > actual && + test_cmp expect actual +' + cat >expect <<\EOF Author: Santa Claus Author: Santa Claus @@ -461,6 +489,11 @@ test_expect_success 'Grep author with log.mailmap' ' test_cmp expect actual ' +test_expect_success 'log.mailmap is true by default these days' ' + git log --author Santa | grep Author >actual && + test_cmp expect actual +' + test_expect_success 'Only grep replaced author with --use-mailmap' ' git log --use-mailmap --author "" >actual && test_must_be_empty actual -- cgit v1.2.3