feat(git): history graph with search, commit details, file history, blame/browse at a revision, compare refs, and multi-commit cherry-pick/revert with preview, pause banner and undo

This commit is contained in:
2026-11-02 12:06:39 +07:00
parent 2b5d7268ed
commit e1f433804c
35 changed files with 6277 additions and 319 deletions
+22 -2
View File
@@ -972,6 +972,10 @@ const paths = {
"remote-rename",
"remote-remove",
"conflict-save",
"pick-continue",
"pick-skip",
"pick-abort",
"undo-pick",
],
},
},
@@ -1067,7 +1071,23 @@ const paths = {
confirm: {
type: "boolean",
description:
"discard, discard-hunk, merge-abort, undo-commit and shelf-drop; the call is refused without it. Also the answer to 409 EAGENTRUNNING (shelve, unshelve, a switch moving uncommitted changes while an agent of the lane is working).",
"discard, discard-hunk, merge-abort, undo-commit, shelf-drop, pick-skip, pick-abort and undo-pick; the call is refused without it (400 ECONFIRM). Also the answer to 409 EAGENTRUNNING (shelve, unshelve, a switch moving uncommitted changes while an agent of the lane is working).",
},
shas: {
type: "array",
items: { type: "string" },
description:
"cherry-pick, revert (server/lib/git-pick.js): 1-50 non-merge commits (400 EBADSHA / EMERGECOMMIT) applied as ONE git sequence in the order GET /git/pick-plan shows — a pick oldest first, a revert newest first. Clean tree, repo-root lane, nothing already open (EDIRTY / ESUBDIR / 409 EMERGING). Answers {from, to, commits, conflicts, paused, applied}; paused:true with conflicts[] stops at a conflict (or, with empty:true, at a commit already on the branch) — finish with pick-continue (409 ECONFLICTS while anything is unmerged, 409 EEMPTY when the resolution changed nothing), pick-skip {confirm:true} (drops that commit and goes on) or pick-abort {confirm:true} (`git <op> --abort`, back to from; also ends a sequence whose *_HEAD is gone). The single sha body is unchanged.",
},
from: {
type: "string",
description:
"undo-pick: the HEAD before the pick/revert (its from). Must be an ancestor of to, 1-50 commits back, none of them a merge (EMERGECOMMIT).",
},
to: {
type: "string",
description:
"undo-pick: the HEAD the pick produced; 409 ESTALE once HEAD moved on, 409 EPUSHED once any remote-tracking branch holds one of the commits. Runs `reset --soft <from>` (the changes stay staged).",
},
},
},
@@ -1086,7 +1106,7 @@ const paths = {
404: { description: "Lane not found." },
409: {
description:
"EGIT — git ran and refused (a rejected push, a diverged --ff-only pull); its stderr is appended to error.message. EGITAUTH — the remote wants a login (carries auth). EHUNKGONE, EMERGING, ENOMERGE, ECONFLICTS.",
"EGIT — git ran and refused (a rejected push, a diverged --ff-only pull); its stderr is appended to error.message. EGITAUTH — the remote wants a login (carries auth). EHUNKGONE, EMERGING, ENOMERGE, ECONFLICTS, EEMPTY, ESTALE, EPUSHED.",
},
500: { description: "Unexpected server-side failure." },
},