code: func (r *Repository) Worktree() (*Worktree, error) {
  	if r.wt == nil {
  		return nil, ErrIsBareRepository
  	}
  
  	return &Worktree{r: r, Filesystem: r.wt}, nil
  }
docs: // Worktree returns a worktree based on the given fs, if nil the default
  // worktree will be used.