aboutsummaryrefslogtreecommitdiffstats
path: root/clients
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-11-07 20:29:58 +0100
committerGitHub <noreply@github.com>2016-11-07 20:29:58 +0100
commit0ff9ef2b44c53e557c78bde0fd9c29847e5f0e23 (patch)
treeb9c7485fe99e6e89fa736ceb0223aeb2ecddb77c /clients
parentf6ed7424cbf33c7013332d7e95b4262a4bc4a523 (diff)
downloadgo-git-0ff9ef2b44c53e557c78bde0fd9c29847e5f0e23.tar.gz
global storage interface refactor (#112)
* core: ObjectStorage, ReferenceStorage renamed to ObjectStorer and ReferenceStorer * rebase * general, changes request by @alcortes * general, changes request by @alcortes
Diffstat (limited to 'clients')
-rw-r--r--clients/common/common.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/clients/common/common.go b/clients/common/common.go
index 8e8b2e2..c7cac00 100644
--- a/clients/common/common.go
+++ b/clients/common/common.go
@@ -110,10 +110,9 @@ func (i *GitUploadPackInfo) Decode(r io.Reader) error {
}
func (i *GitUploadPackInfo) addRefs(ar *advrefs.AdvRefs) error {
- i.Refs = make(memory.ReferenceStorage, 0)
for name, hash := range ar.References {
ref := core.NewReferenceFromStrings(name, hash.String())
- i.Refs.Set(ref)
+ i.Refs.SetReference(ref)
}
return i.addSymbolicRefs(ar)
@@ -133,7 +132,7 @@ func (i *GitUploadPackInfo) addSymbolicRefs(ar *advrefs.AdvRefs) error {
name := core.ReferenceName(chunks[0])
target := core.ReferenceName(chunks[1])
ref := core.NewSymbolicReference(name, target)
- i.Refs.Set(ref)
+ i.Refs.SetReference(ref)
}
return nil