aboutsummaryrefslogtreecommitdiffstats
path: root/options.go
diff options
context:
space:
mode:
authorAnthony Weems <amlweems@gmail.com>2017-01-17 11:17:11 -0600
committerSantiago M. Mola <santi@mola.io>2017-01-17 18:17:11 +0100
commit6593c757346f9817a770ff0ea091cce3e8243070 (patch)
tree6fbb72583931b0386e382177970650a9cdbca4eb /options.go
parent241e8ba00ac9533299d62dc38684305af2b6c301 (diff)
downloadgo-git-6593c757346f9817a770ff0ea091cce3e8243070.tar.gz
transport: remove SetAuth, fixes #206 (#210)
* remove SetAuth functions, implement at NewUploadPackSession/NewReceivePackSession level. * propagate transport.Auth from Fetch/Pull/Clone options to the transport API.
Diffstat (limited to 'options.go')
-rw-r--r--options.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/options.go b/options.go
index 95584c2..cb0859b 100644
--- a/options.go
+++ b/options.go
@@ -22,7 +22,7 @@ var (
type CloneOptions struct {
// The (possibly remote) repository URL to clone from
URL string
- // Auth credentials, if required, to uses with the remote repository
+ // Auth credentials, if required, to use with the remote repository
Auth transport.AuthMethod
// Name of the remote to be added, by default `origin`
RemoteName string
@@ -61,6 +61,8 @@ type PullOptions struct {
SingleBranch bool
// Limit fetching to the specified number of commits.
Depth int
+ // Auth credentials, if required, to use with the remote repository
+ Auth transport.AuthMethod
}
// Validate validate the fields and set the default values.
@@ -84,6 +86,8 @@ type FetchOptions struct {
// Depth limit fetching to the specified number of commits from the tip of
// each remote branch history.
Depth int
+ // Auth credentials, if required, to use with the remote repository
+ Auth transport.AuthMethod
}
// Validate validate the fields and set the default values
@@ -108,6 +112,8 @@ type PushOptions struct {
// RefSpecs specify what destination ref to update with what source
// object. A refspec with empty src can be used to delete a reference.
RefSpecs []config.RefSpec
+ // Auth credentials, if required, to use with the remote repository
+ Auth transport.AuthMethod
}
// Validate validate the fields and set the default values