Search code examples
gitgit-bare

Git mailmap on bare repository


I set up a .mailmap file in my git repository, so now running

git log --format="%aE"

in my local repo correctly maps all email addresses as specified in the .mailmap file. But after I push to my bare repo and run the same command on the server, the output is unchanged (the .mailmap file is ignored). I'm sure this is because bare repositories don't have a working tree, so the log command doesn't see the .mailmap file. Is there some tricky way I can make it work?

The clunky way I can think of is to run:

git show master:.mailmap

and then apply some sort of find and replace operation. Is this the best option?


Solution

  • Which version of git do you have where you are hosting your bare repository? Looking at git source, your case should be already handled by this commit, included in v1.8.2.