git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Bug in .mailmap handling?
@ 2013-07-12 16:07 Stefan Beller
  2013-07-12 17:35 ` Junio C Hamano
  2013-07-12 20:28 ` Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: Stefan Beller @ 2013-07-12 16:07 UTC (permalink / raw)
  To: git

Hello,

you may have noticed I am currently trying to bring the 
mailmap file of git itself up to date. I noticed
some behavior, which I did not expect. Have a look yourself:

---
	# prepare test environment:
	mkdir testmailmap
	cd testmailmap/
	git init

	# 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"

	# how do we know it's the same person?
	git shortlog
	A (2):
		  add test1
		  add test2

	# reports as expected:
	git shortlog -sne
		  1  A <A@example.org>
		  1  A <changed_email@example.org>
		  
	# Adding the line to the mailmap should make life easy, so we know
	# it's the same person
	echo "A <A@example.org> <changed_email@example.org>" > .mailmap

	# Come on, I just wanted to have it reported as one person!
	git shortlog -sne
		 1  A <A@example.org>
		 1  A <a@example.org>
		 
	# So let's try another line in the mailmap file, (small 'a')
	echo "A <a@example.org> <changed_email@example.org>" > .mailmap

	# We're not there yet?
	git shortlog -sne
		 1  A <A@example.org>
		 1  A <a@example.org>

	# Now let's write it rather explicit: 
	# (essentially just write 2 lines into the mailmap file)
	cat << EOF > .mailmap
	A <a@example.org> <changed_email@example.org>
	A <a@example.org> <A@example.org>
	EOF
		 
	# works as expected now
	git shortlog -sne
		 2  A <a@example.org>

	# works as expected now as well
	git shortlog      
	A (2):
		  add test1
		  add test2

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-07-12 21:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-12 16:07 Bug in .mailmap handling? Stefan Beller
2013-07-12 17:35 ` Junio C Hamano
2013-07-12 17:47   ` Stefan Beller
2013-07-12 20:28 ` Junio C Hamano
2013-07-12 20:35   ` Stefan Beller
2013-07-12 20:38   ` Junio C Hamano
2013-07-12 20:50     ` Junio C Hamano
2013-07-12 21:13       ` [PATCH] Add a testcase for checking case insensitivity of mail map Stefan Beller

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).