diffs.nvim/lua/diffs
Barrett Ruth a2053a132b
feat: unified diff conflict resolution for unmerged files (#99)
## Problem

Pressing `du` on a `UU` (unmerged) file in the fugitive status buffer
had no
effect. There was no way to see a proper ours-vs-theirs diff with syntax
highlighting and intra-line changes, or to resolve conflicts from within
a
unified diff view.

Additionally, pressing `du` on a section header containing only unmerged
files
showed "no changes in section" because `git diff` produces combined
(`diff --cc`)
output for unmerged files, which was stripped entirely.

## Solution

Fetch `:2:` (ours) and `:3:` (theirs) from the git index and generate a
standard
unified diff. The existing highlight pipeline (treesitter + intra-line)
applies
automatically. Resolution keymaps (`doo`/`dot`/`dob`/`don`) on hunks in
the diff
view write changes back to the working file's conflict markers.
Navigation
(`]x`/`[x`) jumps between unresolved conflict hunks.

For section diffs, combined diff entries are now replaced with generated
ours-vs-theirs unified diffs instead of being stripped.

Works for merge, cherry-pick, and rebase conflicts — git populates
`:2:`/`:3:`
the same way for all three.

Closes #61
2026-02-09 12:21:13 -05:00
..
commands.lua feat: unified diff conflict resolution for unmerged files (#99) 2026-02-09 12:21:13 -05:00
conflict.lua feat: unified diff conflict resolution for unmerged files (#99) 2026-02-09 12:21:13 -05:00
debug.lua fix(debug): resolve sparse array crash in json dump 2026-02-07 00:50:02 -05:00
diff.lua fix(diff): strip linematch from char-level diff 2026-02-07 00:50:08 -05:00
fugitive.lua feat: unified diff conflict resolution for unmerged files (#99) 2026-02-09 12:21:13 -05:00
git.lua feat(git): add index and working tree content retrieval 2026-02-04 22:23:09 -05:00
health.lua feat(highlight): add character-level intra-line diff highlighting 2026-02-06 13:53:58 -05:00
highlight.lua fix(ci): remove unused variable 2026-02-07 15:12:44 -05:00
init.lua feat(conflict): detect and resolve inline merge conflict markers 2026-02-07 17:38:34 -05:00
lib.lua feat(highlight): add character-level intra-line diff highlighting 2026-02-06 13:53:58 -05:00
log.lua feat: add :Gdiff, :Gvdiff, :Ghdiff commands for unified diff view 2026-02-04 19:52:17 -05:00
merge.lua feat: unified diff conflict resolution for unmerged files (#99) 2026-02-09 12:21:13 -05:00
parser.lua feat(highlight): add treesitter context padding from disk 2026-02-07 13:05:53 -05:00