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

Method Validate

options.go:226–242  ·  view source on GitHub ↗

Validate validates the fields and sets the default values.

()

Source from the content-addressed store, hash-verified

224
225// Validate validates the fields and sets the default values.
226func (o *FetchOptions) Validate() error {
227 if o.RemoteName == "" {
228 o.RemoteName = DefaultRemoteName
229 }
230
231 if o.Tags == InvalidTagMode {
232 o.Tags = TagFollowing
233 }
234
235 for _, r := range o.RefSpecs {
236 if err := r.Validate(); err != nil {
237 return err
238 }
239 }
240
241 return nil
242}
243
244// PushOptions describes how a push should be performed.
245type PushOptions struct {

Callers

nothing calls this directly

Calls 1

ValidateMethod · 0.45

Tested by

no test coverage detected