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

[PATCH] mailmap: Testing the single letter name case.

From
Stefan Beller <stefanbeller@googlemail.com>
Date
Jul 13, 2013, 07:20 UTC
Message-ID
<1373700020-30436-1-git-send-email-stefanbeller@googlemail.com>
In-Reply-To
<1373665135-32484-2-git-send-email-gitster@pobox.com>
This is a regression test for a66e77eab70a08938fdc2227b7ada0f0465c6991
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
---
 t/t4203-mailmap.sh | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index 842b754..9ec87a2 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -409,4 +409,45 @@ test_expect_success 'Blame output (complex mapping)' '
 	test_cmp expect actual.fuzz
 '
 
+cat >expect <<\EOF
+A <ShortName@company.xy> (2):
+      eighth
+      nineth
+
+A U Thor <author@example.com> (1):
+      initial
+
+CTO <cto@company.xx> (1):
+      seventh
+
+Other Author <other@author.xx> (2):
+      third
+      fourth
+
+Santa Claus <santa.claus@northpole.xx> (2):
+      fifth
+      sixth
+
+Some Dude <some@dude.xx> (1):
+      second
+
+EOF
+
+# Regression test
+# Using a single letter name to check for off-by-one errors in parse_name_and_email
+test_expect_success 'check mapping for short names' '
+	echo one >two &&
+	git add two &&
+	git commit --author "A <shortname@company.xx>" -m "eighth" &&
+
+	echo two >> two &&
+	git add two &&
+	git commit --author "A <ShortName@company.xy>" -m "nineth" &&
+
+	echo "A <ShortName@company.xy> <shortname@company.xx>" >> .mailmap &&
+	git shortlog HEAD -e >actual
+
+	test_cmp expect actual
+'
+
 test_done
-- 
1.8.3.2.776.gfcf213d
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 14 in “Microfixes to mailmap”
  1. 0/4 Microfixes to mailmapJunio C Hamano, Jul 12, 2013
  2. 1/4 mailmap: do not lose single-letter namesJunio C Hamano, Jul 12, 2013
  3. mailmap: Testing the single letter name case.Stefan Beller, Jul 13, 2013
  4. Junio C HamanoJul 13, 2013
  5. Stefan BellerJul 13, 2013
  6. Junio C HamanoJul 13, 2013
  7. Eric SunshineJul 15, 2013
  8. Junio C HamanoJul 15, 2013
  9. Eric SunshineJul 14, 2013
  10. 2/4 mailmap: do not downcase mailmap entriesJunio C Hamano, Jul 12, 2013
  11. 3/4 mailmap: style fixesJunio C Hamano, Jul 12, 2013
  12. 4/4 add a testcase for checking case insensitivity of mailmapJunio C Hamano, Jul 12, 2013
  13. Eric SunshineJul 12, 2013
  14. Eric SunshineJul 12, 2013

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.