aboutsummaryrefslogtreecommitdiffstats
path: root/remote.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 /remote.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 'remote.go')
-rw-r--r--remote.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/remote.go b/remote.go
index 8060409..bcc4c4c 100644
--- a/remote.go
+++ b/remote.go
@@ -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}
}