git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 3/3] tests: add test for git log --no-use-mailmap

From
Ariadne Conill <ariadne@dereferenced.org>
Date
Jul 11, 2019, 17:26 UTC
Message-ID
<20190711172626.16480-4-ariadne@dereferenced.org>
In-Reply-To
<20190711172626.16480-1-ariadne@dereferenced.org>

In order to prove that the --no-use-mailmap option works as expected, we add a test for it which runs with -Dlog.mailmap=true to ensure that the option successfully negates the configured default.

Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
---
 t/t4203-mailmap.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index 43b1522ea2..23a8947bce 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -465,6 +465,14 @@ test_expect_success 'Only grep replaced author with --use-mailmap' '
 	git log --use-mailmap --author "<cto@coompany.xx>" >actual &&
 	test_must_be_empty actual
 '
+cat >expect <<\EOF
+Author: santa <me@company.xx>
+EOF
+
+test_expect_success 'Grep author with --no-use-mailmap + log.mailmap=True' '
+	git -c log.mailmap=True log --no-use-mailmap --author santa | grep Author >actual &&
+	test_cmp expect actual
+'
 
 # git blame
 cat >expect <<\EOF
-- 
2.17.1
Previous: Beat BolliNext: Beat Bolli
Message 7 of 9 in “use mailmap by default in git log”
  1. 0/3 use mailmap by default in git logAriadne Conill, Jul 11, 2019
  2. 1/3 log: use mailmap by defaultAriadne Conill, Jul 11, 2019
  3. 2/3 log: add --no-use-mailmap option to complement --use-mailmap optionAriadne Conill, Jul 11, 2019
  4. Beat BolliJul 11, 2019
  5. Ariadne ConillJul 11, 2019
  6. Beat BolliJul 11, 2019
  7. 3/3 tests: add test for git log --no-use-mailmapAriadne Conill, Jul 11, 2019
  8. Beat BolliJul 11, 2019
  9. Ariadne ConillJul 11, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.