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

[PATCH 3/3] t: mailmap: add simple name translation test

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Feb 4, 2012, 19:50 UTC
Message-ID
<1328385024-6955-4-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1328385024-6955-1-git-send-email-felipe.contreras@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 t/t4203-mailmap.sh |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index b1bc521..589e39e 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -157,6 +157,9 @@ A U Thor <author@example.com> (1):
 CTO <cto@company.xx> (1):
       seventh
 
+Mr. Right <right@company.xx> (1):
+      eight
+
 Other Author <other@author.xx> (2):
       third
       fourth
@@ -196,6 +199,11 @@ test_expect_success 'Shortlog output (complex mapping)' '
 	test_tick &&
 	git commit --author "CTO <cto@coompany.xx>" -m seventh &&
 
+	echo eight >>one &&
+	git add one &&
+	test_tick &&
+	git commit --author "Wrong <right@company.xx>" -m eight &&
+
 	mkdir -p internal_mailmap &&
 	echo "Committed <committer@example.com>" > internal_mailmap/.mailmap &&
 	echo "<cto@company.xx>                       <cto@coompany.xx>" >> internal_mailmap/.mailmap &&
@@ -204,6 +212,7 @@ test_expect_success 'Shortlog output (complex mapping)' '
 	echo "Other Author <other@author.xx>         <nick2@company.xx>" >> internal_mailmap/.mailmap &&
 	echo "Santa Claus <santa.claus@northpole.xx> <me@company.xx>" >> internal_mailmap/.mailmap &&
 	echo "Santa Claus <santa.claus@northpole.xx> <me@company.xx>" >> internal_mailmap/.mailmap &&
+	echo "Mr. Right <right@company.xx>" >> internal_mailmap/.mailmap &&
 
 	git shortlog -e HEAD >actual &&
 	test_cmp expect actual
@@ -212,6 +221,9 @@ test_expect_success 'Shortlog output (complex mapping)' '
 
 # git log with --pretty format which uses the name and email mailmap placemarkers
 cat >expect <<\EOF
+Author Wrong <right@company.xx> maps to Mr. Right <right@company.xx>
+Committer C O Mitter <committer@example.com> maps to Committed <committer@example.com>
+
 Author CTO <cto@coompany.xx> maps to CTO <cto@company.xx>
 Committer C O Mitter <committer@example.com> maps to Committed <committer@example.com>
 
@@ -248,6 +260,7 @@ OBJID (Other Author DATE 4) four
 OBJID (Santa Claus  DATE 5) five
 OBJID (Santa Claus  DATE 6) six
 OBJID (CTO          DATE 7) seven
+OBJID (Mr. Right    DATE 8) eight
 EOF
 test_expect_success 'Blame output (complex mapping)' '
 	git blame one >actual &&
@@ -264,6 +277,7 @@ OBJID (<other@author.xx>          DATE 4) four
 OBJID (<santa.claus@northpole.xx> DATE 5) five
 OBJID (<santa.claus@northpole.xx> DATE 6) six
 OBJID (<cto@company.xx>           DATE 7) seven
+OBJID (<right@company.xx>         DATE 8) eight
 EOF
 test_expect_success 'Blame output (complex mapping)' '
 	git blame -e one >actual &&
-- 
1.7.9.1.g97f7d
Previous: Felipe ContrerasNext: Jonathan Nieder
Message 14 of 22 in “blame: fix output with mailmap”
  1. 0/3 blame: fix output with mailmapFelipe Contreras, Feb 4, 2012
  2. 1/3 blame: fix email output with mailmapFelipe Contreras, Feb 4, 2012
  3. Jeff KingFeb 4, 2012
  4. Thomas RastFeb 5, 2012
  5. Felipe ContrerasFeb 5, 2012
  6. Jeff KingFeb 6, 2012
  7. 2/3 t: mailmap: add 'git blame -e' testsFelipe Contreras, Feb 4, 2012
  8. Jonathan NiederFeb 4, 2012
  9. Felipe ContrerasFeb 4, 2012
  10. Jonathan NiederFeb 4, 2012
  11. Felipe ContrerasFeb 4, 2012
  12. Junio C HamanoFeb 5, 2012
  13. Felipe ContrerasFeb 5, 2012
  14. 3/3 t: mailmap: add simple name translation testFelipe Contreras, Feb 4, 2012
  15. Jonathan NiederFeb 4, 2012
  16. Felipe ContrerasFeb 4, 2012
  17. Jonathan NiederFeb 4, 2012
  18. Felipe ContrerasFeb 4, 2012
  19. Jeff KingFeb 4, 2012
  20. Felipe ContrerasFeb 6, 2012
  21. Jonathan NiederFeb 5, 2012
  22. Felipe ContrerasFeb 6, 2012

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.