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 2025-05-27 13:34:39 -07:00 committed by GitHub
parent f54c057001
commit 697c2ba71f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 124 additions and 15 deletions

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