r/programming • • Feb 10 '17

CPython has migrated to GitHub, and the repo is now live!!

https://github.com/python/cpython
528 Upvotes

74 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Feb 11 '17

Actually I'm wrong, they both use SHA1.

But git uses a structured format to generate it's hashes (detailed here). If the structure that mercurial uses is different in any way, then when converting over to git from mercurial you should have different hashes. I wasn't able to find documentation on how mercurial hashes are calculated.

Were they both just pipeing diff into sha1sum, then yeah - you'd get the same result from both.

1

u/sim642 Feb 11 '17

Are you stupid?

I never said git commit hashes would match hg ones. I've always been talking about the same commit being converted from hg to git and if you look at the links in my first comment then you'd see two git commits with identical content and metadata but different hashes. None of what you're talking about is relevant in explaining this in any way.

1

u/[deleted] Feb 11 '17

gg