From 4b82d78d6cb77e41ef7b98a06577161ee404e7b2 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Thu, 10 Apr 2025 10:51:48 -0400 Subject: [PATCH] Fix merge conflicts jumping (cherry-pick #28508) (#28511) Cherry-picked 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. Co-authored-by: Cole Miller --- 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 bfee14c1c29ed19c1f4831d2ab2c95dc1bdff7d3..16ddf73e9c5df8b0f09f931658f7d7c738cc3ddb 100644 --- a/crates/project/src/git_store.rs +++ b/crates/project/src/git_store.rs @@ -2582,9 +2582,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.