]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t4203-mailmap.sh
path.c: don't call the match function without value in trie_find()
[thirdparty/git.git] / t / t4203-mailmap.sh
index 43b1522ea21a9c531c64fdba3b6f3bcde680063a..918ada69eb96662a2814a7f44c4eb0c3714bd0da 100755 (executable)
@@ -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