Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Interesting. One never stops learning new git features...

However, while this works for git (i.e., maps old address to new address in "git log" for example), GitHub does not seem to honor this file.



Well, yes, but maybe they should? It doesn't seem like a huge feature...


Now which commit's mailmap file should be used for the association? Whatever is on the "default" branch currently?


Whatever is in the branch you are looking at? Seems fairly straightforward.


Viewing a specific commit or viewing the repositories' statistics ("insights" tab) both have no attached branch.


in Github or in Git itself? While possible, I don't believe there's many floating commits around.

The other issue of course is that at this point in time, there would not be a .mailmap. Of course, github can then fall back to a .mailmap file in the latest commit of the main branch.


Commits are not usually floating but are very commonly in more than one branch.


What about if somebody clones a repo, then adds a .mailmap pointing all the addresses in the history to their own?


If somebody clones the repo they can even rewrite history. But that is not the same as them being able to claim the ownership of a commit in the original repo.


Then in their clone, they made all the commits. But who cares about their clone?


GitHub bases the association of commits to user accounts on the list of e-mail addresses configured in the user’s profile: https://github.com/settings/emails




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: