MCPcopy Index your code
hub / github.com/go-git/go-git / Validate

Method Validate

options.go:787–789  ·  view source on GitHub ↗

Validate validates the fields and sets the default values. TODO: deprecate in favor of Validate(r *Repository) in v6.

(w *Worktree)

Source from the content-addressed store, hash-verified

785//
786// TODO: deprecate in favor of Validate(r *Repository) in v6.
787func (o *GrepOptions) Validate(w *Worktree) error {
788 return o.validate(w.r)
789}
790
791func (o *GrepOptions) validate(r *Repository) error {
792 if !o.CommitHash.IsZero() && o.ReferenceName != "" {

Callers

nothing calls this directly

Calls 1

validateMethod · 0.95

Tested by

no test coverage detected