Validate validates the fields and sets the default values. TODO: deprecate in favor of Validate(r *Repository) in v6.
(w *Worktree)
| 746 | // |
| 747 | // TODO: deprecate in favor of Validate(r *Repository) in v6. |
| 748 | func (o *GrepOptions) Validate(w *Worktree) error { |
| 749 | return o.validate(w.r) |
| 750 | } |
| 751 | |
| 752 | func (o *GrepOptions) validate(r *Repository) error { |
| 753 | if !o.CommitHash.IsZero() && o.ReferenceName != "" { |