From ffd9d4eb59a7ca794145a3ec241e47ad4042f1fa Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Wed, 3 May 2023 10:34:29 -0700 Subject: [PATCH] Fix bug in repo detection --- crates/project/src/worktree.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/project/src/worktree.rs b/crates/project/src/worktree.rs index fccb382ca5..6a8de46f8f 100644 --- a/crates/project/src/worktree.rs +++ b/crates/project/src/worktree.rs @@ -1492,7 +1492,7 @@ impl LocalSnapshot { let mut current_candidate = None; for (work_directory, repo) in (&self.repository_entries).iter() { if work_directory.contains(path) { - if work_directory.0.as_os_str().len() > max_len { + if work_directory.0.as_os_str().len() >= max_len { current_candidate = Some(repo); max_len = work_directory.0.as_os_str().len(); } else {