开发者

GIT .mailmap works per repo, but not in global, why?

I have a group of repos and I have a .mailmap file to combine user names.

My .mailmap file works for all the repos, when it is in the root of each.

I tried to put the file in my ~/.gitconfig file and it doesn't work. Im using Git for Windows and in my global .gitconfig file I added this:

>> git config --global mailmap.file "~/.mailmap"

Thats the command I used. Also tried the log shown below.

[log]
    mailmap = ~/.mailmap
[mailmap]
    file = C:/Documents and Settings/<username>/.mailmap

Both lead to the same file location, but it doesn't seem to honor this file when using git-shortlog

A开发者_StackOverflow社区ny suggestions? Thanks.

EDIT Never did git this to work on windows. My hack-fix was to keep the mailmap file in the database, and to write it to each repository with a script.


Looking into my .gitconfig, I see that all the windows paths are written with two backslashes like

[difftool "kdiff3"]
  path = C:\\Program Files\\KDiff3\\kdiff3.exe

This works for me.

Maybe you should write

[mailmap]
  file = C:\\Documents and Settings\\<username>\\.mailmap

to get things working. As an alternative, you could try the git-style path declaration like

[mailmap]
  file = /c/Documents\ and\ Settings/<username>/.mailmap
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜