improves the git feature by adding a conflict status

This commit is contained in:
2026-10-30 16:47:34 +01:00
parent caec81e762
commit 0278d7fbd1
14 changed files with 10927 additions and 19 deletions
+2 -1
View File
@@ -78,6 +78,7 @@ Four colour-coded sections, each only when it has rows, in this order:
- A header shows the name, a count badge and the bulk actions; a click folds the section.
- A row shows a chevron, a status badge (`A`, `M`, `D`, `R`, `U`), the path (folder dim, name bright, struck through when deleted), `+N` / `−N`, and its actions. A click expands an inline side-by-side diff of that row's half, last commit (or index) left and working tree right, with 3 lines of context around each change and longer unchanged runs folded into `⋯ N unchanged lines`. A file over the diff cap shows `Too big.`.
- A merge conflict (`UU`, `AA`, `DD`, or any `U`) is one unstaged `U` row in **changed**, never a staged row, and does not count toward `Commit N files`. Its badge is red, a red flag after the path has the tooltip `Merge conflict — resolve, then Stage`, and the row has a red left bar and a faint red fill. Its inline diff is the last commit against the file on disk, conflict markers included.
- A conflicted row offers only **Stage**: staging marks the resolution.
- **Discard** reverts unstaged changes (modified and deleted files from the index, new files removed). **Discard** and **Delete** ask first (`git.confirmDiscard`, default on); **Restore** never asks. Stage and unstage never ask.
- **Right-click** a row: **Open in editor** (left out for a deleted file), **Pass on reference**, **Copy reference**. Open in editor and Pass on reference close the view first.
@@ -103,7 +104,7 @@ The second column. A standard project file tree.
- An `EXPLORER` header.
- Folders expand and collapse. Files and folders use type icons.
- Files that have changes show their status letter (`A`, `M`, `D`) on the right of their row.
- Files that have changes show their status letter (`A`, `M`, `R`, `D`, `U`) on the right of their row; a conflict's `U` is red.
- **Left-click** a file opens it in the editor. The selected file is highlighted.
- The tree hides paths matched by `files.exclude` and, when `files.followGitignore` is on, paths ignored by git.
- **Right-click** a file offers **Copy reference**, which copies the file's project-relative path to the clipboard (the file-level form of the editor's Copy reference).
+1
View File
@@ -56,6 +56,7 @@ A file with a git change shows a letter on the right of its row:
| `M` | Modified | teal |
| `R` | Renamed | teal |
| `D` | Deleted | amber-deep |
| `U` | Merge conflict | red |
The letter is the file's overall status. When a file has both a staged and an unstaged change, the unstaged one wins. Folders do not show a letter.
+4 -4
View File
@@ -72,18 +72,18 @@ The changes sit in up to four sections, in this order. A section with no rows is
- Click a section header to fold or unfold it.
- One file can show up twice: once in staged and once in another section. That happens when you staged a file and then edited it again. Each row stands for its own half.
- A conflicted row (`U`) only offers **Stage**. Staging it marks the conflict as resolved.
- A file with a merge conflict is never staged on its own: it sits in **changed** as a `U` row, and it does not count as a staged file. That row only offers **Stage**. Staging it marks the conflict as resolved.
### File rows
Every row, left to right:
- A chevron: click anywhere on the row to show or hide its inline diff.
- A status badge: `A` new, `M` modified, `D` deleted, `R` renamed, `U` conflict. Hover it for the word.
- The path: the folder dim, the file name bright. A deleted file is struck through.
- A status badge: `A` new, `M` modified, `D` deleted, `R` renamed, `U` merge conflict (red). Hover it for the word.
- The path: the folder dim, the file name bright. A deleted file is struck through. A conflicted file has a red flag after its name; hover it for `Merge conflict — resolve, then Stage`.
- The line counts: `+N` in teal and `−N` in light amber.
- The row actions, from the table above.
Staged rows carry an amber bar on their left edge.
Staged rows carry an amber bar on their left edge. A conflicted row carries a red bar and a faint red fill. Red is used for nothing else in the app.
### Row actions
- **Stage** and **Unstage** run at once. They never ask.