I read Hash collision in git from this it appears what very unlikely what two different commits in git will have same hash.
But what about all commits not only git? My application working with git,svn,hg - can i assume that there will be no different commits with same hash?
For now i'm trying to deside how stop my application from creation same commits from different forks of one repo in db. I figure out what i can do hash column in db unique and if i already have commit with this hash - just skip it. But i dont know is there is a big/small chance that i will skip unique commit and not the duplicate of already existing commit.
Both git and mercurial use sha1
for generating hashes, so I would say that the probability of having the same hash by two different commits one from git and one from mercurial is the same of having the same hash by two different git commits.
Svn does not use hashes to identify commits but incremental revision numbers so you do not have any collision problem here