aboutsummaryrefslogtreecommitdiffstats
path: root/storage/memory
diff options
context:
space:
mode:
authorJavi Fontan <jfontan@gmail.com>2018-08-30 20:28:40 +0200
committerJavi Fontan <jfontan@gmail.com>2018-09-04 12:41:31 +0200
commit6384ab93a2dbac9045ee19099455cbcfe82d0201 (patch)
tree66be7ef79ec1267306af9e5e4b9870dde54ef5db /storage/memory
parent2f1583896bcc3c182d8165d6aeeb23c771cc5417 (diff)
downloadgo-git-6384ab93a2dbac9045ee19099455cbcfe82d0201.tar.gz
storage/dotgit: add KeepDescriptors option
This option maintains packfile file descriptors opened after reading objects from them. It improves performance as it does not have to be opening packfiles each time an object is needed. Also adds Close to EncodedObjectStorer to close all the files manualy. Signed-off-by: Javi Fontan <jfontan@gmail.com>
Diffstat (limited to 'storage/memory')
-rw-r--r--storage/memory/storage.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/memory/storage.go b/storage/memory/storage.go
index 2e32509..3d3b348 100644
--- a/storage/memory/storage.go
+++ b/storage/memory/storage.go
@@ -183,6 +183,9 @@ func (o *ObjectStorage) ObjectPacks() ([]plumbing.Hash, error) {
func (o *ObjectStorage) DeleteOldObjectPackAndIndex(plumbing.Hash, time.Time) error {
return nil
}
+func (s *ObjectStorage) Close() error {
+ return nil
+}
var errNotSupported = fmt.Errorf("Not supported")