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