Skip to content

Commit 30d4c10

Browse files
authored
enhance: don't show unmerged files in STAGED area (#1359)
Unmerged files (i.e unresolved conflicts) should only appear in the Unstaged area, and not "duplicated" in the Staged area. Motivation: * The user-friendly git-status command does not show these as "Changes to be committed". * If they appear in the Staged area, they are quite redundant since the Diff view will just show "No changes or only EOL changes". * Some other Git UIs (like Fork) don't show these as Staged items either. NOTE: According to docs for the git-status "Short Format" (and --porcelain=v1), the XY fields for Unmerged paths do NOT actually represent the Index & Working-tree states, instead they represent the states introduced by each HEAD in the merge (i.e Ours & Theirs, relative to Base).
1 parent ca33107 commit 30d4c10

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ViewModels/WorkingCopy.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,8 @@ public ContextMenu CreateContextForOpenAI()
15351535
foreach (var c in _cached)
15361536
{
15371537
if (c.Index != Models.ChangeState.None &&
1538-
c.Index != Models.ChangeState.Untracked)
1538+
c.Index != Models.ChangeState.Untracked &&
1539+
!c.IsConflict)
15391540
rs.Add(c);
15401541
}
15411542
return rs;

0 commit comments

Comments
 (0)