pub fn pathspec(repo_root: &Path, path: &Path) -> String
path made relative to repo_root (via canonicalize, like Python’s Path.resolve()); if it lies outside the work tree, the absolute path is passed through unchanged.
path
repo_root
canonicalize
Path.resolve()