ref: 88525c1dd3b5048fcdaa302b82e0d7c654c8ad06
parent: eeadac1851149248e788579cc83b925c27c2a8e1
author: Runxi Yu <me@runxiyu.org>
date: Fri Feb 20 23:01:45 EST 2026
objectstore/loose: Remove redundant length check
--- a/objectstore/loose/paths.go
+++ b/objectstore/loose/paths.go
@@ -17,9 +17,6 @@
return "", fmt.Errorf("objectstore/loose: object id algorithm mismatch: got %s want %s", id.Algorithm(), store.algo)}
hex := id.String()
- if len(hex) != store.algo.HexLen() {- return "", fmt.Errorf("objectstore/loose: malformed object id %q", hex)- }
return path.Join("objects", hex[:2], hex[2:]), nil}
--
⑨