aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
diff options
context:
space:
mode:
authorValentin Cocaud <v.cocaud@gmail.com>2019-05-03 11:54:28 +0200
committerValentin Cocaud <v.cocaud@gmail.com>2019-06-17 22:51:37 +0200
commitb4fba7ede146be79cf65b89975250cf6869fb409 (patch)
treef7444e0731d559859de6d5739983f4ec9b40ab12 /repository.go
parenta35ce6e8ee8e0fc5449c0fd10d45d0bddc894edc (diff)
downloadgo-git-b4fba7ede146be79cf65b89975250cf6869fb409.tar.gz
git : allows to create a Remote without a Repository
Signed-off-by: Valentin Cocaud <v.cocaud@gmail.com>
Diffstat (limited to 'repository.go')
-rw-r--r--repository.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/repository.go b/repository.go
index a94dc2f..2251d6c 100644
--- a/repository.go
+++ b/repository.go
@@ -451,7 +451,7 @@ func (r *Repository) Remote(name string) (*Remote, error) {
return nil, ErrRemoteNotFound
}
- return newRemote(r.Storer, c), nil
+ return NewRemote(r.Storer, c), nil
}
// Remotes returns a list with all the remotes
@@ -465,7 +465,7 @@ func (r *Repository) Remotes() ([]*Remote, error) {
var i int
for _, c := range cfg.Remotes {
- remotes[i] = newRemote(r.Storer, c)
+ remotes[i] = NewRemote(r.Storer, c)
i++
}
@@ -478,7 +478,7 @@ func (r *Repository) CreateRemote(c *config.RemoteConfig) (*Remote, error) {
return nil, err
}
- remote := newRemote(r.Storer, c)
+ remote := NewRemote(r.Storer, c)
cfg, err := r.Storer.Config()
if err != nil {
@@ -504,7 +504,7 @@ func (r *Repository) CreateRemoteAnonymous(c *config.RemoteConfig) (*Remote, err
return nil, ErrAnonymousRemoteName
}
- remote := newRemote(r.Storer, c)
+ remote := NewRemote(r.Storer, c)
return remote, nil
}