diff options
| author | 2026-02-21 04:01:45 +0800 | |
|---|---|---|
| committer | 2026-02-21 04:01:45 +0800 | |
| commit | 88525c1dd3b5048fcdaa302b82e0d7c654c8ad06 (patch) | |
| tree | d8a39de157e7f0fb28d159add4ecdd99935f80f4 /objectstore/loose | |
| parent | objectstore/loose: Verify the length where possible. (diff) | |
| signature | No signature | |
objectstore/loose: Remove redundant length check
Diffstat (limited to 'objectstore/loose')
| -rw-r--r-- | objectstore/loose/paths.go | 3 |
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 } |
