From 8ab25e2bac2fcfff3d413024d8154cd3dd3f3dea Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Thu, 10 Apr 2025 10:29:36 -0400 Subject: [PATCH] Fix merge conflicts jumping (#28508) This regressed in #27568, oops. Release Notes: - Fixed a bug causing conflicted files in the git panel to jump to the "Tracked" section as soon as they were staged. --- crates/project/src/git_store.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/project/src/git_store.rs b/crates/project/src/git_store.rs index 24fc1f694cacba1859440f3a7123a082810f5fa2..53e2f1a10a4efe0c87985c06d737577901f46f71 100644 --- a/crates/project/src/git_store.rs +++ b/crates/project/src/git_store.rs @@ -2630,9 +2630,7 @@ impl RepositorySnapshot { } pub fn has_conflict(&self, repo_path: &RepoPath) -> bool { - self.statuses_by_path - .get(&PathKey(repo_path.0.clone()), &()) - .map_or(false, |entry| entry.status.is_conflicted()) + self.merge_conflicts.contains(repo_path) } /// This is the name that will be displayed in the repository selector for this repository.