aboutsummaryrefslogtreecommitdiffstats
path: root/storage/memory
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-02-20 23:13:33 +0100
committerGitHub <noreply@github.com>2017-02-20 23:13:33 +0100
commitefe9ecf9a2b4d9346a1ae105210b4dabb26aa2a8 (patch)
tree7e4315a2a18a46cf691c19d5ae2e96eb84e96c18 /storage/memory
parentf5a9c7ed5ab58afa255c2f405b30f06f88a6aecf (diff)
parent53385d62c573e0e2ef67587099cce0144cf60b3c (diff)
downloadgo-git-efe9ecf9a2b4d9346a1ae105210b4dabb26aa2a8.tar.gz
Merge pull request #269 from smola/remove-reference
plumbing/storer: add RemoveReference
Diffstat (limited to 'storage/memory')
-rw-r--r--storage/memory/storage.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/storage/memory/storage.go b/storage/memory/storage.go
index 6cec47b..9b55b1f 100644
--- a/storage/memory/storage.go
+++ b/storage/memory/storage.go
@@ -217,6 +217,11 @@ func (r ReferenceStorage) IterReferences() (storer.ReferenceIter, error) {
return storer.NewReferenceSliceIter(refs), nil
}
+func (r ReferenceStorage) RemoveReference(n plumbing.ReferenceName) error {
+ delete(r, n)
+ return nil
+}
+
type ShallowStorage []plumbing.Hash
func (s *ShallowStorage) SetShallow(commits []plumbing.Hash) error {