MCPcopy
hub / github.com/go-git/go-git / Chroot

Method Chroot

worktree_fs.go:144–149  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

142}
143
144func (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

Callers 15

BenchmarkObjectsFunction · 0.45
PlainInitWithOptionsFunction · 0.45
dotGitToOSFilesystemsFunction · 0.45
TemporalFilesystemMethod · 0.45
TestCleanMethod · 0.45
TestCleanBareMethod · 0.45
TestAlternatesRepoFunction · 0.45
TestLinkedWorktreeMethod · 0.45
RepositoryMethod · 0.45

Calls 1

validReadPathMethod · 0.95

Tested by 11

BenchmarkObjectsFunction · 0.36
TemporalFilesystemMethod · 0.36
TestCleanMethod · 0.36
TestCleanBareMethod · 0.36
TestAlternatesRepoFunction · 0.36
TestLinkedWorktreeMethod · 0.36