(root, path string)
| 112 | } |
| 113 | |
| 114 | func pathWithin(root, path string) bool { |
| 115 | rel, err := filepath.Rel(root, path) |
| 116 | return err == nil && filepath.IsLocal(rel) |
| 117 | } |
| 118 | |
| 119 | // copyGitTree preserves the index, untracked files and worktree metadata, which |
| 120 | // a clone would lose. It copies file contents, never hardlinks. Only Git's path |