diff options
author | Pascal Kuthe | 2022-12-11 10:20:34 +0000 |
---|---|---|
committer | GitHub | 2022-12-11 10:20:34 +0000 |
commit | 70d78123b94d93c801171ac3dd29e2a493feee20 (patch) | |
tree | f57fc633bca23b9d34f59b2d8e9ff0fbf4e70d57 /helix-core | |
parent | 0e8ea13696206aa8ad289d539a5df62f34a73dec (diff) |
properly handle detachted git worktrees (#5097)
Diffstat (limited to 'helix-core')
-rw-r--r-- | helix-core/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-core/src/lib.rs b/helix-core/src/lib.rs index 0e76ebbb..ee174e69 100644 --- a/helix-core/src/lib.rs +++ b/helix-core/src/lib.rs @@ -69,7 +69,7 @@ pub fn find_root(root: Option<&str>, root_markers: &[String]) -> std::path::Path top_marker = Some(ancestor); } - if ancestor.join(".git").is_dir() { + if ancestor.join(".git").exists() { // Top marker is repo root if not root marker was detected yet if top_marker.is_none() { top_marker = Some(ancestor); |