From 026d7c48163a9d246820c84693673a13f42f9145 Mon Sep 17 00:00:00 2001 From: Jeremy Stribling Date: Tue, 31 Oct 2017 15:15:58 -0700 Subject: filesystem: implement PackRefs() Currently this implementation is only valid for kbfsgit, since it assumes some things about the filesystem not being updated during the packing, and about conflict resolution rules. In the future, it would be nice to replace this with a more general one, and move this kbfsgit-optimized implementation into kbfsgit. Issue: KBFS-2517 --- storage/memory/storage.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'storage/memory') diff --git a/storage/memory/storage.go b/storage/memory/storage.go index 927ec41..3d4e84a 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -236,6 +236,14 @@ func (r ReferenceStorage) IterReferences() (storer.ReferenceIter, error) { return storer.NewReferenceSliceIter(refs), nil } +func (r ReferenceStorage) CountLooseRefs() (int, error) { + return len(r), nil +} + +func (r ReferenceStorage) PackRefs() error { + return nil +} + func (r ReferenceStorage) RemoveReference(n plumbing.ReferenceName) error { delete(r, n) return nil -- cgit