News for hackers. Stuff that matters.
Re:Prefer mercurial to git by Hello71 on Sunday February 16, 2014 @10:29AM (#7247868)
Every object in the repository, including commits and trees, is hashed via SHA-1. Commits also include the SHA of the previous commit, so if you verify each commit, then compare the SHA at the top to the "correct" one, then that means your entire repository is valid.
Re:Prefer mercurial to git by masklinn on Sunday February 16, 2014 @10:44AM (#7247924)
> Every object in the repository, including commits and trees, is hashed via SHA-1. Commits also include the SHA of the previous commit

mercurial does pretty much the same, as far as I know.

> so if you verify each commit

But surely that does not happen on every CLI operation does it? So you only find out about corruption when all the repository is traversed and checked, which will usually be explicitly or on clone. Thus the same as hg.

Re:Prefer mercurial to git by DannyBee on Sunday February 16, 2014 @11:57AM (#7248222)
actually, it's possible to execute clone in git without it checking. If you do a local clone, it will happily hand you a broken repo.