diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2019-06-18 23:59:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-18 23:59:11 +0200 |
commit | f9a30199e7083bdda8adad3a4fa2ec42d25c1fdb (patch) | |
tree | f7444e0731d559859de6d5739983f4ec9b40ab12 /repository.go | |
parent | a35ce6e8ee8e0fc5449c0fd10d45d0bddc894edc (diff) | |
parent | b4fba7ede146be79cf65b89975250cf6869fb409 (diff) | |
download | go-git-f9a30199e7083bdda8adad3a4fa2ec42d25c1fdb.tar.gz |
Merge pull request #1142 from EmrysMyrddin/feature/export-new-remotev4.12.0
git : allows to create a Remote without a Repository
Diffstat (limited to 'repository.go')
-rw-r--r-- | repository.go | 8 |
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 } |