feat(git): per-block conflict view with mine/theirs choices (#45)

Opening a conflicted file in the Changes panel now shows each conflict
block as its two sides, labelled from git's markers and tinted apart,
with Keep mine / Take theirs / Keep both per block (undoable, ^/v to
jump). Save and mark resolved writes the chosen text through the
whole-file editor's PUT /git/file (baseSha stale check) then runs
resolve done. The Merge conflicts group's buttons are text, and a
conflicted file is marked with a red ! in the Files tree.

Fix: ls-files --cached lists an unmerged path once per stage, so the
tree showed a conflicted file three times; lsFiles now dedupes.
This commit is contained in:
2026-09-25 13:35:50 +07:00
parent 52392962fb
commit 1da46f10f4
12 changed files with 709 additions and 31 deletions
+22 -1
View File
@@ -287,5 +287,26 @@
"changes.mergeAbortConfirm": "Bấm lần nữa để huỷ merge",
"changes.takeOurs": "Giữ bản của mình",
"changes.takeTheirs": "Lấy bản kia",
"changes.markResolved": "Đánh dấu đã xong (sau khi đã sửa hết dấu conflict)"
"changes.markResolved": "Đánh dấu đã xong (sau khi đã sửa hết dấu conflict)",
"conflict.left": "Còn {{left}}/{{total}} khối conflict",
"conflict.prev": "Khối trước",
"conflict.next": "Khối sau",
"conflict.allOurs": "Giữ hết của mình",
"conflict.allTheirs": "Lấy hết bản kia",
"conflict.editByHand": "Sửa tay",
"conflict.unbalanced": "Dấu conflict không khớp nhau (đã sửa tay?) - hãy dùng Sửa tay.",
"conflict.unusable": "Không hiển thị được file này ở đây (nhị phân hoặc quá lớn) - hãy dùng Giữ hết của mình / Lấy hết bản kia, hoặc terminal.",
"conflict.keepOurs": "Giữ của mình",
"conflict.takeTheirs": "Lấy bản kia",
"conflict.keepBoth": "Giữ cả hai",
"conflict.chose.ours": "Đã giữ của mình",
"conflict.chose.theirs": "Đã lấy bản kia",
"conflict.chose.both": "Đã giữ cả hai",
"conflict.undo": "Hoàn tác",
"conflict.ours": "Của mình ({{label}})",
"conflict.theirs": "Bản kia ({{label}})",
"conflict.reset": "Huỷ",
"conflict.save": "Lưu và đánh dấu đã xong",
"changes.takeOursHint": "Giữ bản của mình cho cả file",
"changes.takeTheirsHint": "Lấy bản kia cho cả file"
}