<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <br>
    <div class="moz-cite-prefix">On 01/04/2016 10:59 PM, Serhiy
      Storchaka wrote:<br>
    </div>
    <blockquote cite="mid:76423167.53tLd9kano@raxxla" type="cite">Is it
      possible to keep the same hashes in both Mercurial and Git?
      Or at least the same short hashes?<br>
    </blockquote>
    <br>
    tl;dr: it's impossible.<br>
    <br>
    The hash is a SHA1 of the revision's "manifest", which contains all
    the metadata about the revision.  To preserve the Mercurial hashes
    would mean doing something vile like rewriting these hashes after
    populating the repo.  If this worked at all, it would be terribly
    fragile; my guess is that many git commands (e.g. "git fsck") would
    notice and view it as damage.<br>
    <br>
    The short hashes are simply the unique leading part of the hash, so
    they would only be preserved if we could preserve the full hashes.<br>
    <br>
    <br>
    <i>/arry</i><br>
  </body>
</html>