diff options
author | Javi Fontan <jfontan@gmail.com> | 2018-01-16 13:11:57 +0000 |
---|---|---|
committer | Javi Fontan <jfontan@gmail.com> | 2018-01-16 13:11:57 +0000 |
commit | c281165b48d9901d391c583b6d7c28d37edb4ff5 (patch) | |
tree | 8abb7b1591a88c5228a51924121ea6a0d996e86e | |
parent | 5b1cde56bde4834805b14f1613e8f7fda1703bf8 (diff) | |
download | go-git-c281165b48d9901d391c583b6d7c28d37edb4ff5.tar.gz |
Cache should hold objects the same size as MaxSize
Signed-off-by: Javi Fontan <jfontan@gmail.com>
-rw-r--r-- | plumbing/cache/object_lru.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plumbing/cache/object_lru.go b/plumbing/cache/object_lru.go index 9e850b2..0494539 100644 --- a/plumbing/cache/object_lru.go +++ b/plumbing/cache/object_lru.go @@ -51,7 +51,7 @@ func (c *ObjectLRU) Put(obj plumbing.EncodedObject) { objSize := FileSize(obj.Size()) - if objSize >= c.MaxSize { + if objSize > c.MaxSize { return } |