Re: Bug in .mailmap handling?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The commands are exactly as given in the first mail.
(I run it multiple times, and this exact behavior comes up)

I think there is some problem with the capitalisation
of the first (if not all) characters. (Hence the small 'a')

So either check with these example commands yourself, or take my latest
patch for the mailmap to reproduce on real names, please.

On 07/12/2013 07:35 PM, Junio C Hamano wrote:
> Stefan Beller <stefanbeller@xxxxxxxxxxxxxx> writes:
> 
>> 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@xxxxxxxxxxx>" -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@xxxxxxxxxxx>" -m "add test2"
>>
>> 	# how do we know it's the same person?
>> 	git shortlog
>> 	A (2):
>> 		  add test1
>> 		  add test2
> 
> You don't, and it is a long known behaviour.
> 
>> 	# reports as expected:
>> 	git shortlog -sne
>> 		  1  A <A@xxxxxxxxxxx>
>> 		  1  A <changed_email@xxxxxxxxxxx>
> 
> Yes.
> 
>> 	# Adding the line to the mailmap should make life easy, so we know
>> 	# it's the same person
>> 	echo "A <A@xxxxxxxxxxx> <changed_email@xxxxxxxxxxx>" > .mailmap
>>
>> 	# Come on, I just wanted to have it reported as one person!
>> 	git shortlog -sne
>> 		 1  A <A@xxxxxxxxxxx>
>> 		 1  A <a@xxxxxxxxxxx>
> 
> Err, where does the lowercase a@ come from in the above?  Are we
> missing some steps before we get here?
> 
>> 	# So let's try another line in the mailmap file, (small 'a')
>> 	echo "A <a@xxxxxxxxxxx> <changed_email@xxxxxxxxxxx>" > .mailmap
> 
> This is ">", not ">>", I presume?  Otherwise changed_email is mapped
> to two destination, no?
> 
>> 	# We're not there yet?
>> 	git shortlog -sne
>> 		 1  A <A@xxxxxxxxxxx>
>> 		 1  A <a@xxxxxxxxxxx>
> 
> Expected, as long as some hidden set-up you did not describe that
> caused me to say "Err, where does the lowercase a@ come from" is
> there, i.e. one of the two commits is done by <a@xxxxxxxxxxx>.
> 
>> 	# Now let's write it rather explicit: 
>> 	# (essentially just write 2 lines into the mailmap file)
>> 	cat << EOF > .mailmap
>> 	A <a@xxxxxxxxxxx> <changed_email@xxxxxxxxxxx>
>> 	A <a@xxxxxxxxxxx> <A@xxxxxxxxxxx>
>> 	EOF
>> 		 
>> 	# works as expected now
>> 	git shortlog -sne
>> 		 2  A <a@xxxxxxxxxxx>
> 
> Makes sense.
> 
>> 	# works as expected now as well
>> 	git shortlog      
>> 	A (2):
>> 		  add test1
>> 		  add test2


Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]