Skip to content

Conversation

goran-w
Copy link
Contributor

@goran-w goran-w commented May 23, 2025

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 the docs for git-status "Short Format" and --porcelain format(s), the <XY> field values for unmerged paths (specifically) do NOT actually represent the Index & Working-tree states, INSTEAD they represent the states introduced by each HEAD in the merge (i.e Theirs & Ours, relative to Base).

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).
@love-linger love-linger self-assigned this May 24, 2025
@love-linger love-linger added the enhancement New feature or request label May 24, 2025
@love-linger love-linger merged commit 30d4c10 into sourcegit-scm:develop May 24, 2025
13 checks passed
love-linger added a commit that referenced this pull request May 24, 2025
…the `unmerged` file state (#1359)

Signed-off-by: leo <longshuang@msn.cn>
@goran-w goran-w deleted the dont_show_unmerged_in_staged_area branch May 26, 2025 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants