diff options
author | Valentin Cocaud <v.cocaud@gmail.com> | 2019-05-03 11:54:28 +0200 |
---|---|---|
committer | Valentin Cocaud <v.cocaud@gmail.com> | 2019-06-17 22:51:37 +0200 |
commit | b4fba7ede146be79cf65b89975250cf6869fb409 (patch) | |
tree | f7444e0731d559859de6d5739983f4ec9b40ab12 /remote.go | |
parent | a35ce6e8ee8e0fc5449c0fd10d45d0bddc894edc (diff) | |
download | go-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 'remote.go')
-rw-r--r-- | remote.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -45,7 +45,10 @@ type Remote struct { s storage.Storer } -func newRemote(s storage.Storer, c *config.RemoteConfig) *Remote { +// NewRemote creates a new Remote. +// The intended purpose is to use the Remote for tasks such as listing remote references (like using git ls-remote). +// Otherwise Remotes should be created via the use of a Repository. +func NewRemote(s storage.Storer, c *config.RemoteConfig) *Remote { return &Remote{s: s, c: c} } |