aboutsummaryrefslogtreecommitdiff
path: root/objectstore/loose
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-02-21 04:01:45 +0800
committerGravatar Runxi Yu2026-02-21 04:01:45 +0800
commit88525c1dd3b5048fcdaa302b82e0d7c654c8ad06 (patch)
treed8a39de157e7f0fb28d159add4ecdd99935f80f4 /objectstore/loose
parentobjectstore/loose: Verify the length where possible. (diff)
signatureNo signature
objectstore/loose: Remove redundant length check
Diffstat (limited to 'objectstore/loose')
-rw-r--r--objectstore/loose/paths.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/objectstore/loose/paths.go b/objectstore/loose/paths.go
index ee761f39..0e4b7d05 100644
--- a/objectstore/loose/paths.go
+++ b/objectstore/loose/paths.go
@@ -17,9 +17,6 @@ func (store *Store) objectPath(id objectid.ObjectID) (string, error) {
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
}