When a symlink is encountered during the cloning of a directory tree, only the symlink itself is cloned, the target of the symlink is not cloned. The symlink is cloned without change, and the path contained by the symlink is not altered in any way.
When a symlink is cloned, if the symlink contains:
- A relative path to a directory or a file within the directory being cloned, the cloned symlink will function just as it did before being cloned. The path resolves correctly because the target of the symlink is also cloned by the tree clone operation.
- A relative path to a directory or a file outside the directory being cloned, then target path contained by the cloned symlink will resolve correctly only if a target of the same name exists in the same location relative to the cloned symlink location.
- An absolute path to a directory or a file (a global symlink), the path contained in the copied symlink should resolve correctly.