code: func (o *ResetOptions) Validate(r *Repository) error {
  	if o.Commit == plumbing.ZeroHash {
  		ref, err := r.Head()
  		if err != nil {
  			return err
  		}
  
  		o.Commit = ref.Hash()
  	}
  
  	return nil
  }
docs: // Validate validates the fields and sets the default values.