diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-31 01:14:03 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-31 01:14:03 +0100 |
commit | c6349552c1c54ea114b92ae23fc840f68f6551f4 (patch) | |
tree | 6fbaf514ae9caf8241a0b9dfc3709d60942876c5 /repository.go | |
parent | fe1fc1aa7dca3e0f6e54ab17f0acfa45f269e58c (diff) | |
download | go-git-c6349552c1c54ea114b92ae23fc840f68f6551f4.tar.gz |
internal -> core
Diffstat (limited to 'repository.go')
-rw-r--r-- | repository.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/repository.go b/repository.go index c732d0f..9bdccc0 100644 --- a/repository.go +++ b/repository.go @@ -5,8 +5,8 @@ import ( "fmt" "gopkg.in/src-d/go-git.v2/clients/common" + "gopkg.in/src-d/go-git.v2/core" "gopkg.in/src-d/go-git.v2/formats/packfile" - "gopkg.in/src-d/go-git.v2/internal" ) var ( @@ -19,7 +19,7 @@ const ( type Repository struct { Remotes map[string]*Remote - Storage *internal.RAWObjectStorage + Storage *core.RAWObjectStorage } // NewRepository creates a new repository setting remote as default remote @@ -39,7 +39,7 @@ func NewRepository(url string) (*Repository, error) { func NewPlainRepository() *Repository { return &Repository{ Remotes: map[string]*Remote{}, - Storage: internal.NewRAWObjectStorage(), + Storage: core.NewRAWObjectStorage(), } } @@ -59,7 +59,7 @@ func (r *Repository) Pull(remoteName, branch string) error { } reader, err := remote.Fetch(&common.GitUploadPackRequest{ - Want: []internal.Hash{ref}, + Want: []core.Hash{ref}, }) pr := packfile.NewReader(reader) @@ -73,7 +73,7 @@ func (r *Repository) Pull(remoteName, branch string) error { } // Commit return the commit with the given hash -func (r *Repository) Commit(h internal.Hash) (*Commit, error) { +func (r *Repository) Commit(h core.Hash) (*Commit, error) { obj, ok := r.Storage.Get(h) if !ok { return nil, ObjectNotFoundErr @@ -97,7 +97,7 @@ func (r *Repository) Commits() *CommitIter { } // Tree return the tree with the given hash -func (r *Repository) Tree(h internal.Hash) (*Tree, error) { +func (r *Repository) Tree(h core.Hash) (*Tree, error) { obj, ok := r.Storage.Get(h) if !ok { return nil, ObjectNotFoundErr |