normalizePath method
Implementation
String normalizePath(String path) {
if (!path.startsWith('/')) {
path = path == '.' ? workTree : p.normalize(p.join(workTree, path));
}
if (!path.startsWith(workTree)) {
throw PathSpecOutsideRepoException(pathSpec: path);
}
return path;
}