pub fn get_relative_path_to_repo(
path: &Path,
repo: &Repository,
) -> Result<PathBuf>Expand description
Computes the relative path from the repository root to the given absolute path.
§Errors
- If the repository does not have a working directory (bare repository).
- If the provided path is not within the repository’s working directory.