Skip to content

Commit ea5668f

Browse files
Fix cache size guard which was off by a power of 2.
1 parent 3820919 commit ea5668f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal/cache/backends/gob.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ func (b *GobBackend) Add(commits []git.Commit) (err error) {
252252
return err
253253
}
254254

255-
if data.Len() > 0xFFFF_FFFF {
255+
if data.Len() > 0x7FFF_FFFF {
256256
return errors.New(
257-
"cannot add more than 4,294,976,296 bytes to cache at once", // lol
257+
"cannot add more than 2,147,483,648 bytes to cache at once", // lol
258258
)
259259
}
260260

0 commit comments

Comments
 (0)