MCPcopy Index your code
hub / github.com/go-git/go-git / worktreeFilesystem

Struct worktreeFilesystem

worktree_fs.go:42–46  ·  view source on GitHub ↗

worktreeFilesystem wraps a billy.Filesystem and validates every path passed to a mutating operation. This prevents writing to, or deleting from, dangerous locations (e.g. .git/*, ../) regardless of which worktree code path triggers the operation.

Source from the content-addressed store, hash-verified

40// dangerous locations (e.g. .git/*, ../) regardless of which worktree
41// code path triggers the operation.
42type worktreeFilesystem struct {
43 billy.Filesystem
44 protectNTFS bool
45 protectHFS bool
46}
47
48func newWorktreeFilesystem(fs billy.Filesystem, protectNTFS, protectHFS bool) *worktreeFilesystem {
49 return &worktreeFilesystem{Filesystem: fs, protectNTFS: protectNTFS, protectHFS: protectHFS}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected