aboutsummaryrefslogtreecommitdiffstats
path: root/storage/memory
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2019-02-02 13:08:52 +0100
committerGitHub <noreply@github.com>2019-02-02 13:08:52 +0100
commitd1b5bceb228e528bf085a3d4e2c35218e692da01 (patch)
tree9dadb6130108cce350f546e4e30bc421c2b422a1 /storage/memory
parenta1f6ef44dfed1253ef7f3bc049f66b15f8fc2ab2 (diff)
parent96317743391ac87aeb07d292469e212671628437 (diff)
downloadgo-git-d1b5bceb228e528bf085a3d4e2c35218e692da01.tar.gz
Merge pull request #1006 from mcuadros/transactional-storage
storage: transactional, new storage with transactional capabilities
Diffstat (limited to 'storage/memory')
-rw-r--r--storage/memory/storage.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/storage/memory/storage.go b/storage/memory/storage.go
index 6e11742..f240f2a 100644
--- a/storage/memory/storage.go
+++ b/storage/memory/storage.go
@@ -13,7 +13,6 @@ import (
)
var ErrUnsupportedObjectType = fmt.Errorf("unsupported object type")
-var ErrRefHasChanged = fmt.Errorf("reference has changed concurrently")
// Storage is an implementation of git.Storer that stores data on memory, being
// ephemeral. The use of this storage should be done in controlled envoriments,
@@ -258,7 +257,7 @@ func (r ReferenceStorage) CheckAndSetReference(ref, old *plumbing.Reference) err
if old != nil {
tmp := r[ref.Name()]
if tmp != nil && tmp.Hash() != old.Hash() {
- return ErrRefHasChanged
+ return storage.ErrReferenceHasChanged
}
}
r[ref.Name()] = ref