开发者

Tool to automate building a .mailmap file

开发者 https://www.devze.com 2023-03-16 06:28 出处:网络
Is there a tool to automate building a .mailmap file for开发者_如何学Go a git repository?A lot of the stuff involved in building one can be done automatically after asking some questions (like \"which

Is there a tool to automate building a .mailmap file for开发者_如何学Go a git repository? A lot of the stuff involved in building one can be done automatically after asking some questions (like "which name/email is preferred for person A?"), and a lot more can be done heuristically (like "Is John A. Smith the same person as John Smith?").

I've found it at least a little easier using the command git log --format="%aN <%aE>" | sort -u | less, but building up the file is still more work than it seems like it should be.


You are on the right path. git log --all should be your starting point. From that point forward, bash piping and scripting is something you should embrace and leverage. Git itself is a bunch of shell scripts anyway - at least at the higher level commands. I've become addicted to looking at them. They can shed a lot of light of what is possible and how to do a lot of interesting things.

Hope this helps.


I've made a script. It currently only guesses canonical email addresses.


I ended up writing this tool. It should generalize nicely to other projects. It also helps keep an AUTHORS file up-to-date.

0

精彩评论

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