Enable merge conflict parsing for currently-unmerged files (#31549)

Previously, we only enabled merge conflict parsing for files that were
unmerged at the last time a change was detected to the repo's merge
heads. Now we enable the parsing for these files *and* any files that
are currently unmerged.

The old strategy meant that conflicts produced via `git stash pop` would
not be parsed.

Release Notes:

- Fixed parsing of merge conflicts when the conflict was produced by a
`git stash pop`
This commit is contained in:
Max Brunsfeld authored and GitHub committed 2025-05-27 13:34:39 -07:00
1 parent 5c83060246
commit 45fa1dd45f
4 files changed
+124 -15

No files matched your search

+2 -2
View File
@@ -219,7 +219,7 @@ impl ProjectDiff {
};
let repo = git_repo.read(cx);
let namespace = if repo.has_conflict(&entry.repo_path) {
let namespace = if repo.had_conflict_on_last_merge_head_change(&entry.repo_path) {
CONFLICT_NAMESPACE
} else if entry.status.is_created() {
NEW_NAMESPACE
@@ -372,7 +372,7 @@ impl ProjectDiff {
};
let namespace = if GitPanelSettings::get_global(cx).sort_by_path {
TRACKED_NAMESPACE
} else if repo.has_conflict(&entry.repo_path) {
} else if repo.had_conflict_on_last_merge_head_change(&entry.repo_path) {
CONFLICT_NAMESPACE
} else if entry.status.is_created() {
NEW_NAMESPACE