On 10/05/2012 10:06 AM, Jeremy Lavergne wrote:
Still, this would be only valid for all existing hashes. Imagine a new 
changeset would appear which would increase the default to 8.
If that short hash had been used at MacPorts it would likely cause an error, 
wouldn't it.

Given that their "book" says the largest git repositories they've seen just 
barely require 12 digits... I don't think we really need to worry. If paranoid we could 
use 12 or we could use the whole thing: as long as it works, great.

If there's a collision, it will error out rather than give you bad data:
http://stackoverflow.com/a/7128558

The problem for us is if we pick a truncated hash and then there's a collision, one needs to figure out which of the two untruncated hashes is the correct one. Presumably, it would be the older one, but for unpopular ports, it could be a while to figure that out.

Seems like picking something 12 or above then means you don't need to worry about this problem.

Blair


_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to