diff options
Diffstat (limited to 'options.go')
-rw-r--r-- | options.go | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -11,6 +11,14 @@ type CloneOptions struct { URL string // Auth credentials, if required, to uses with the remote repository Auth common.AuthMethod + // Remote branch to fetch + ReferenceName core.ReferenceName +} + +func (o *CloneOptions) Default() { + if o.ReferenceName == "" { + o.ReferenceName = core.HEAD + } } // FetchOptions describe how a fetch should be perform @@ -18,3 +26,9 @@ type FetchOptions struct { // Remote branch to fetch ReferenceName core.ReferenceName } + +func (o *FetchOptions) Default() { + if o.ReferenceName == "" { + o.ReferenceName = core.HEAD + } +} |