2

I've been trying to make my .mailmap file to work globally in Windows, without having to put it at the root of each repository.

So I've moved it to C:\Users\.mailmap and added in the config file the following:

[mailmap]
    file = 'C:/Users/<username>/.mailmap'

But it doesn't work.

I've tried all variations of no-quotes, single quotes, double quotes, single slash, double backslash... and I haven't been able to make it work. I've also tried using a more Windows-friendly file name, like MailMapGlobal.txt (similar to the GitignoreGlobal.txt I have that works just fine).

While researching the problem I've found this apparently unresolved question from 2011, which is pretty much the same, and I was wondering if there's been any news on this issue in the last 6 years or if there's a known solution that is not listed in that question.

I'm using Windows 7, with git 2.13.2.windows.1

MikMik
  • 3,426
  • 2
  • 23
  • 41
  • I have no idea why this would not "just work" on Windows, but will say that there should be no need for quotes: I would expect the no-quotes, forward-slash variant to "just work". But I avoid Windows for a reason, too. :-) – torek Jul 03 '17 at 14:53
  • Well, it doesn't. For example, the global gitignore, which is in the same path, is specified without quotes and double backslash, and it works just fine... – MikMik Jul 03 '17 at 16:24
  • The doubled backslash makes sense there as `git config` eats one level of backslash quoting, so if you use `a\b\c` style names you'd need `a\\b\\c`. – torek Jul 03 '17 at 16:25
  • Possible duplicate of [GIT .mailmap works per repo, but not in global, why?](https://stackoverflow.com/questions/6524756/git-mailmap-works-per-repo-but-not-in-global-why) – erickson Feb 11 '19 at 23:34

0 Answers0