aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Runxi Yu2025-11-18 00:00:00 +0000
committerGravatar Runxi Yu2025-11-18 00:00:00 +0000
commit418ec0bd7c6c969b5dfaae0e064cbcf0a73f3aa7 (patch)
treef78c07cb15b7eec36e5ba28efe791866fd23ba83
parentAdd tests with race detector (diff)
signature
Remove redundant copy in loose.go
-rw-r--r--loose.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/loose.go b/loose.go
index 735b7a96..c0843515 100644
--- a/loose.go
+++ b/loose.go
@@ -74,8 +74,7 @@ func (repo *Repository) looseReadTyped(id Hash) (ObjectType, []byte, error) {
// return ObjectTypeInvalid, nil, ErrInvalidObject
// }
- out := append([]byte(nil), body...)
- return ty, out, nil
+ return ty, body, nil
}
func (repo *Repository) looseTypeSize(id Hash) (ObjectType, int64, error) {