toPathSpec method
Implementation
String toPathSpec(String path) {
if (path.startsWith(workTree)) {
return path.substring(workTree.length);
}
if (path.startsWith('/')) {
throw PathSpecOutsideRepoException(pathSpec: path);
}
return path;
}