aboutsummaryrefslogtreecommitdiffstats
path: root/storage/memory
diff options
context:
space:
mode:
authorJeremy Stribling <strib@alum.mit.edu>2017-10-31 15:15:58 -0700
committerJeremy Stribling <strib@alum.mit.edu>2017-11-29 10:32:55 -0800
commit026d7c48163a9d246820c84693673a13f42f9145 (patch)
tree7cf86e1095be31a205c53224d7a648d71cf76a1c /storage/memory
parent7ced03216a47327d64f68c750114a96cfcbae38b (diff)
downloadgo-git-026d7c48163a9d246820c84693673a13f42f9145.tar.gz
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
Diffstat (limited to 'storage/memory')
-rw-r--r--storage/memory/storage.go8
1 files changed, 8 insertions, 0 deletions
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