(path string)
| 142 | } |
| 143 | |
| 144 | func (sfs *worktreeFilesystem) Chroot(path string) (billy.Filesystem, error) { |
| 145 | if err := sfs.validReadPath(path); err != nil { |
| 146 | return nil, fmt.Errorf("chroot: %w", err) |
| 147 | } |
| 148 | return sfs.Filesystem.Chroot(path) |
| 149 | } |
| 150 | |
| 151 | // validReadPath is like validPath but treats the empty string and "." as |
| 152 | // valid references to the worktree root. Read-side operations on the root |