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

[PATCH] Add a testcase for checking case insensitivity of mail map

From
Stefan Beller <stefanbeller@googlemail.com>
Date
Jul 12, 2013, 21:13 UTC
Message-ID
<1373663593-20346-1-git-send-email-stefanbeller@googlemail.com>
In-Reply-To
<7v4nbzjyel.fsf@alter.siamese.dyndns.org>

Your patch seems to do it. I added a test case which doesn't fail, if your patch is added.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
---
 t/t4203-mailmap.sh | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index 842b754..07152e9 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -409,4 +409,37 @@ test_expect_success 'Blame output (complex mapping)' '
 	test_cmp expect actual.fuzz
 '
 
+test_expect_success 'cleanup after mailmap.blob tests' '
+	rm -f .mailmap
+'
+
+cat >expect <<\EOF
+     2	A <A@example.org>
+     2	Other Author <other@author.xx>
+     2	Santa Claus <santa.claus@northpole.xx>
+     1	A U Thor <author@example.com>
+     1	CTO <cto@company.xx>
+     1	Some Dude <some@dude.xx>
+EOF
+
+test_expect_success 'Test case sensitivity of Names' '
+	# do a commit:
+	echo "asdf" > test1
+	git add test1
+	git commit -a --author="A <A@example.org>" -m "add test1"
+
+	# commit with same name, but different email
+	# (different capitalization does the trick already,
+	# but here I am going to use a different mail)
+	echo "asdf" > test2
+	git add test2
+	git commit -a --author="A <changed_email@example.org>" -m "add test2"
+
+	# Adding the line to the mailmap should make life easy, so we know
+	# it is the same person
+	echo "A <A@example.org> <changed_email@example.org>" > .mailmap
+
+	git shortlog -sne HEAD >actual && test_cmp expect actual
+'
+
 test_done
-- 
1.8.3.2.776.gfcf213d
Previous: Junio C Hamano
Message 8 of 8 in “Bug in .mailmap handling?”
  1. Stefan BellerJul 12, 2013
  2. Junio C HamanoJul 12, 2013
  3. Stefan BellerJul 12, 2013
  4. Junio C HamanoJul 12, 2013
  5. Stefan BellerJul 12, 2013
  6. Junio C HamanoJul 12, 2013
  7. Junio C HamanoJul 12, 2013
  8. Add a testcase for checking case insensitivity of mail mapStefan Beller, Jul 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.