From 5eadb67a4cafdb614b33e0bdf2fd9a996fec55d3 Mon Sep 17 00:00:00 2001 From: Sergio Arbeo Date: Mon, 30 Jan 2017 13:16:46 +0100 Subject: Fix typos in git docs (#230) --- options.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'options.go') diff --git a/options.go b/options.go index cb0859b..4ed9979 100644 --- a/options.go +++ b/options.go @@ -18,7 +18,7 @@ var ( ErrInvalidRefSpec = errors.New("invalid refspec") ) -// CloneOptions describe how a clone should be perform +// CloneOptions describes how a clone should be performed type CloneOptions struct { // The (possibly remote) repository URL to clone from URL string @@ -34,7 +34,7 @@ type CloneOptions struct { Depth int } -// Validate validate the fields and set the default values +// Validate validates the fields and sets the default values func (o *CloneOptions) Validate() error { if o.URL == "" { return ErrMissingURL @@ -51,7 +51,7 @@ func (o *CloneOptions) Validate() error { return nil } -// PullOptions describe how a pull should be perform. +// PullOptions describes how a pull should be performed type PullOptions struct { // Name of the remote to be pulled. If empty, uses the default. RemoteName string @@ -65,7 +65,7 @@ type PullOptions struct { Auth transport.AuthMethod } -// Validate validate the fields and set the default values. +// Validate validates the fields and sets the default values. func (o *PullOptions) Validate() error { if o.RemoteName == "" { o.RemoteName = DefaultRemoteName @@ -78,7 +78,7 @@ func (o *PullOptions) Validate() error { return nil } -// FetchOptions describe how a fetch should be perform +// FetchOptions describes how a fetch should be performed type FetchOptions struct { // Name of the remote to fetch from. Defaults to origin. RemoteName string @@ -90,7 +90,7 @@ type FetchOptions struct { Auth transport.AuthMethod } -// Validate validate the fields and set the default values +// Validate validates the fields and sets the default values func (o *FetchOptions) Validate() error { if o.RemoteName == "" { o.RemoteName = DefaultRemoteName @@ -105,7 +105,7 @@ func (o *FetchOptions) Validate() error { return nil } -// PushOptions describe how a push should be performed. +// PushOptions describes how a push should be performed type PushOptions struct { // RemoteName is the name of the remote to be pushed to. RemoteName string @@ -116,7 +116,7 @@ type PushOptions struct { Auth transport.AuthMethod } -// Validate validate the fields and set the default values +// Validate validates the fields and sets the default values func (o *PushOptions) Validate() error { if o.RemoteName == "" { o.RemoteName = DefaultRemoteName -- cgit From a48bc6e17ef6298f93ec21cdf1a5e387640673b6 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Mon, 30 Jan 2017 14:42:19 +0100 Subject: Repository.Progress moved as a field in *Options (#237) --- options.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'options.go') diff --git a/options.go b/options.go index 4ed9979..8abace2 100644 --- a/options.go +++ b/options.go @@ -5,6 +5,7 @@ import ( "gopkg.in/src-d/go-git.v4/config" "gopkg.in/src-d/go-git.v4/plumbing" + "gopkg.in/src-d/go-git.v4/plumbing/protocol/packp/sideband" "gopkg.in/src-d/go-git.v4/plumbing/transport" ) @@ -32,6 +33,10 @@ type CloneOptions struct { SingleBranch bool // Limit fetching to the specified number of commits Depth int + // Progress is where the human readable information sent by the server is + // stored, if nil nothing is stored and the capability (if supported) + // no-progress, is sent to the server to avoid send this information + Progress sideband.Progress } // Validate validates the fields and sets the default values @@ -63,6 +68,10 @@ type PullOptions struct { Depth int // Auth credentials, if required, to use with the remote repository Auth transport.AuthMethod + // Progress is where the human readable information sent by the server is + // stored, if nil nothing is stored and the capability (if supported) + // no-progress, is sent to the server to avoid send this information + Progress sideband.Progress } // Validate validates the fields and sets the default values. @@ -88,6 +97,10 @@ type FetchOptions struct { Depth int // Auth credentials, if required, to use with the remote repository Auth transport.AuthMethod + // Progress is where the human readable information sent by the server is + // stored, if nil nothing is stored and the capability (if supported) + // no-progress, is sent to the server to avoid send this information + Progress sideband.Progress } // Validate validates the fields and sets the default values -- cgit