diff options
author | Justin Wernick <justin@worthe-it.co.za> | 2023-03-25 21:44:51 +0200 |
---|---|---|
committer | Justin Wernick <justin@worthe-it.co.za> | 2023-03-25 21:46:12 +0200 |
commit | 2e8f9e8043594c8e8ce57daabe4a26a8fb7e9826 (patch) | |
tree | 2d4931fa07e31c4a6de023e1c6b47398b05cc823 /src/git.rs | |
parent | 9761556033c1faaae37f995ba557c47f9f3c357f (diff) |
Insist that git command paths are relative
Diffstat (limited to 'src/git.rs')
-rw-r--r-- | src/git.rs | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -19,9 +19,8 @@ fn personal_git_dir() -> Result<PathBuf, ShackleError> { } fn is_valid_personal_git_repo(path: &PathBuf) -> Result<bool, ShackleError> { - let valid_dir = personal_git_dir()?.canonicalize()?; - let canonical_path = path.canonicalize()?; - let relative_path = match canonical_path.strip_prefix(&valid_dir) { + let valid_dir = personal_git_dir()?; + let relative_path = match path.strip_prefix(&valid_dir) { Ok(relative_path) => relative_path, Err(_) => { return Ok(false); |