From 88525c1dd3b5048fcdaa302b82e0d7c654c8ad06 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 21 Feb 2026 04:01:45 +0800 Subject: objectstore/loose: Remove redundant length check --- objectstore/loose/paths.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'objectstore') 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 } -- cgit v1.3.1-10-gc9f91