MCPcopy Create free account
hub / github.com/go-git/go-git / Validate

Method Validate

options.go:112–130  ·  view source on GitHub ↗

Validate validates the fields and sets the default values.

()

Source from the content-addressed store, hash-verified

110
111// Validate validates the fields and sets the default values.
112func (o *CloneOptions) Validate() error {
113 if o.URL == "" {
114 return ErrMissingURL
115 }
116
117 if o.RemoteName == "" {
118 o.RemoteName = DefaultRemoteName
119 }
120
121 if o.ReferenceName == "" {
122 o.ReferenceName = plumbing.HEAD
123 }
124
125 if o.Tags == InvalidTagMode {
126 o.Tags = AllTags
127 }
128
129 return nil
130}
131
132// PullOptions describes how a pull should be performed.
133type PullOptions struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected