aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
diff options
context:
space:
mode:
Diffstat (limited to 'repository.go')
-rw-r--r--repository.go20
1 files changed, 8 insertions, 12 deletions
diff --git a/repository.go b/repository.go
index b2320b9..78e5b43 100644
--- a/repository.go
+++ b/repository.go
@@ -7,7 +7,6 @@ import (
"gopkg.in/src-d/go-git.v4/config"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/object"
- "gopkg.in/src-d/go-git.v4/plumbing/protocol/packp/sideband"
"gopkg.in/src-d/go-git.v4/plumbing/storer"
"gopkg.in/src-d/go-git.v4/storage/filesystem"
"gopkg.in/src-d/go-git.v4/storage/memory"
@@ -27,11 +26,6 @@ var (
type Repository struct {
r map[string]*Remote
s Storer
-
- // Progress is where the human readable information sent by the server is
- // stored, if nil nothing is stored and the capability (if supported)
- // no-progress, is sent to the server to avoid send this information
- Progress sideband.Progress
}
// NewMemoryRepository creates a new repository, backed by a memory.Storage
@@ -77,7 +71,7 @@ func (r *Repository) Remote(name string) (*Remote, error) {
return nil, ErrRemoteNotFound
}
- return newRemote(r.s, r.Progress, c), nil
+ return newRemote(r.s, c), nil
}
// Remotes return all the remotes
@@ -91,7 +85,7 @@ func (r *Repository) Remotes() ([]*Remote, error) {
var i int
for _, c := range cfg.Remotes {
- remotes[i] = newRemote(r.s, r.Progress, c)
+ remotes[i] = newRemote(r.s, c)
i++
}
@@ -104,7 +98,7 @@ func (r *Repository) CreateRemote(c *config.RemoteConfig) (*Remote, error) {
return nil, err
}
- remote := newRemote(r.s, r.Progress, c)
+ remote := newRemote(r.s, c)
cfg, err := r.s.Config()
if err != nil {
@@ -169,6 +163,7 @@ func (r *Repository) Clone(o *CloneOptions) error {
RefSpecs: r.cloneRefSpec(o, c),
Depth: o.Depth,
Auth: o.Auth,
+ Progress: o.Progress,
})
if err != nil {
return err
@@ -343,8 +338,9 @@ func (r *Repository) Pull(o *PullOptions) error {
}
remoteRefs, err := remote.fetch(&FetchOptions{
- Depth: o.Depth,
- Auth: o.Auth,
+ Depth: o.Depth,
+ Auth: o.Auth,
+ Progress: o.Progress,
})
updated := true
@@ -405,7 +401,7 @@ func (r *Repository) Push(o *PushOptions) error {
return remote.Push(o)
}
-// object.Commit return the commit with the given hash
+// Commit return the commit with the given hash
func (r *Repository) Commit(h plumbing.Hash) (*object.Commit, error) {
return object.GetCommit(r.s, h)
}