diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t4203-mailmap.sh | 33 | ||||
-rwxr-xr-x | t/t7006-pager.sh | 2 |
2 files changed, 33 insertions, 2 deletions
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 <cto@coompany.xx> + Author: claus <me@company.xx> + Author: santa <me@company.xx> + Author: nick2 <nick2@company.xx> + Author: nick2 <bugs@company.xx> + Author: nick1 <bugs@company.xx> + Author: A U Thor <author@example.com> + 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 <cto@coompany.xx> + Author: claus <me@company.xx> + Author: santa <me@company.xx> + Author: nick2 <nick2@company.xx> + Author: nick2 <bugs@company.xx> + Author: nick1 <bugs@company.xx> + Author: A U Thor <author@example.com> + EOF + git log --no-use-mailmap | grep Author > actual && + test_cmp expect actual +' + cat >expect <<\EOF Author: Santa Claus <santa.claus@northpole.xx> Author: Santa Claus <santa.claus@northpole.xx> @@ -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 "<cto@coompany.xx>" >actual && test_must_be_empty actual diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh index 7976fa7bcc..00e09a375c 100755 --- a/t/t7006-pager.sh +++ b/t/t7006-pager.sh @@ -7,8 +7,6 @@ test_description='Test automatic use of a pager.' . "$TEST_DIRECTORY"/lib-terminal.sh test_expect_success 'setup' ' - : squelch advice messages during the transition && - git config --global log.mailmap false && sane_unset GIT_PAGER GIT_PAGER_IN_USE && test_unconfig core.pager && |