diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-27 01:49:58 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-27 01:49:58 +0100 |
commit | 7d6c5a56c0b63705378f125523876de1a97fd1ce (patch) | |
tree | 8945a8a02d53f36a64304beaf006c4f46d61da48 /internal/object.go | |
parent | a2e49a59782a50a9ff116c6d17c6e3888502f2ad (diff) | |
download | go-git-7d6c5a56c0b63705378f125523876de1a97fd1ce.tar.gz |
tree and commit
Diffstat (limited to 'internal/object.go')
-rw-r--r-- | internal/object.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/internal/object.go b/internal/object.go index 0f11140..a30bc9d 100644 --- a/internal/object.go +++ b/internal/object.go @@ -71,18 +71,18 @@ func (o *RAWObject) Write(p []byte) (n int, err error) { } type RAWObjectStorage struct { - Objects map[Hash]*RAWObject - Commits map[Hash]*RAWObject - Trees map[Hash]*RAWObject - Blobs map[Hash]*RAWObject + Objects map[Hash]Object + Commits map[Hash]Object + Trees map[Hash]Object + Blobs map[Hash]Object } func NewRAWObjectStorage() *RAWObjectStorage { return &RAWObjectStorage{ - Objects: make(map[Hash]*RAWObject, 0), - Commits: make(map[Hash]*RAWObject, 0), - Trees: make(map[Hash]*RAWObject, 0), - Blobs: make(map[Hash]*RAWObject, 0), + Objects: make(map[Hash]Object, 0), + Commits: make(map[Hash]Object, 0), + Trees: make(map[Hash]Object, 0), + Blobs: make(map[Hash]Object, 0), } } @@ -92,7 +92,7 @@ func (o *RAWObjectStorage) New() Object { func (o *RAWObjectStorage) Set(obj Object) Hash { h := obj.Hash() - o.Objects[h] = obj.(*RAWObject) + o.Objects[h] = obj switch obj.Type() { case CommitObject: |