mirror of
https://github.com/helix-editor/helix.git
synced 2025-04-06 20:37:44 +03:00
properly handle detachted git worktrees (#5097)
This commit is contained in:
parent
0e8ea13696
commit
70d78123b9
4 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue