Since you have added the assertion above and the `git__fromhex` below will already generate an error if the string contains invalid character, maybe this should be `if (!length)` instead. I think that's the only case where we'll get into trouble.