aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/storer
diff options
context:
space:
mode:
authorTaru Karttunen <taruti@taruti.net>2017-09-12 19:06:47 +0300
committerJeremy Stribling <strib@alum.mit.edu>2017-11-27 11:43:01 -0800
commit3834e571da171844efecc4e26fd89082419079a1 (patch)
tree32756a7a66fcf746574393fbba478bc8aac7b368 /plumbing/storer
parent702718fd59be0aa4b8bf8492403c465107ca17af (diff)
downloadgo-git-3834e571da171844efecc4e26fd89082419079a1.tar.gz
Use optionally locking when updating refs
Diffstat (limited to 'plumbing/storer')
-rw-r--r--plumbing/storer/reference.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/plumbing/storer/reference.go b/plumbing/storer/reference.go
index 5c21f23..50e5886 100644
--- a/plumbing/storer/reference.go
+++ b/plumbing/storer/reference.go
@@ -16,6 +16,7 @@ var ErrMaxResolveRecursion = errors.New("max. recursion level reached")
// ReferenceStorer is a generic storage of references.
type ReferenceStorer interface {
SetReference(*plumbing.Reference) error
+ CheckAndSetReference(new, old *plumbing.Reference) error
Reference(plumbing.ReferenceName) (*plumbing.Reference, error)
IterReferences() (ReferenceIter, error)
RemoveReference(plumbing.ReferenceName) error