Patch Set 1: Do not submit; No score

This particular check exists to protect against someone in the future trying to modify Constants to use a different hash function than SHA-1.  If they do, the hash length will change, and a whole lot of assumptions throughout JGit code will likely start to fall apart.

Within AnyObjectId, we care that the hash is 20 bytes, because we don't do array bounds checking most of the time, and our instances hold 5 ints (aka 20 bytes).  Changing the hash length would require working all of this code.  So this check exists to make the thing fall over, fast, so you at least know you are breaking code and have some work ahead of you.

I'm inclined to leave the code as-is.  Especially the constant, it should be final so the JIT can inline the value at runtime.  Actually, we could even hardcode this to 20 here and then just check the assertion in the static initializer, then javac can inline the constant 20 more easily.