aboutsummaryrefslogtreecommitdiff
path: root/internal/format
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-06-14 01:51:59 +0000
committerGravatar Runxi Yu2026-06-14 01:51:59 +0000
commite7156cfb1df3302c333d9e8add3921f280a3d0e1 (patch)
treeae89890a426a5132a99cbfff7bf7977440e95546 /internal/format
parentobject/store/packed: Remove extraneous nolint (diff)
*: Preallocate slices
Diffstat (limited to 'internal/format')
-rw-r--r--internal/format/packidx/write.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/format/packidx/write.go b/internal/format/packidx/write.go
index d3f22c83..35b2805f 100644
--- a/internal/format/packidx/write.go
+++ b/internal/format/packidx/write.go
@@ -84,7 +84,7 @@ func Write(w io.Writer, objectFormat id.ObjectFormat, entries []Entry, packHash
sw.PutUint32(entries[i].CRC32)
}
- var largeOffsets []uint64
+ largeOffsets := make([]uint64, 0, len(entries))
for i := range entries {
offset := entries[i].Offset