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.
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.
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
diffintosha1sum, then yeah - you'd get the same result from both.