aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2019-06-18 23:59:11 +0200
committerGitHub <noreply@github.com>2019-06-18 23:59:11 +0200
commitf9a30199e7083bdda8adad3a4fa2ec42d25c1fdb (patch)
treef7444e0731d559859de6d5739983f4ec9b40ab12 /remote.go
parenta35ce6e8ee8e0fc5449c0fd10d45d0bddc894edc (diff)
parentb4fba7ede146be79cf65b89975250cf6869fb409 (diff)
downloadgo-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 '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}
}