Skip to content

feat(Parity-Batch1): git CLI 通道补齐 cherry-pick/revert/reset/rename/stash-list/ignore/compare/reword - #9

Merged
ThreeFish-AI merged 1 commit into
feature/1.x.xfrom
ThreeFish-AI/parity-recovery-batch1
Jun 27, 2026
Merged

feat(Parity-Batch1): git CLI 通道补齐 cherry-pick/revert/reset/rename/stash-list/ignore/compare/reword#9
ThreeFish-AI merged 1 commit into
feature/1.x.xfrom
ThreeFish-AI/parity-recovery-batch1

Conversation

@ThreeFish-AI

Copy link
Copy Markdown
Owner

关键转向

引入 GitRepositoryService.execGit(复用 vscode.git 的同一 git 二进制 api.git.path),补齐稳定 API 未暴露的操作——修正此前"API 限制延后"的过度自我设限。不破坏单一 git 事实源(仍用 vscode.git 的 git 二进制)。

补齐功能(对照 IDEA 56 功能矩阵)

  • Cherry-pick / Revert commit(Log 右键,git cherry-pick / git revert)。
  • Reset HEAD(soft/mixed/hard/keep,命令面板,hard 二次确认,git reset)。
  • 分支重命名git branch -m)、比较分支git diff --stat a...b)。
  • Ignore(写 .gitignore)、改写最新提交(amend)。
  • Stash 多栈列表git stash list(CLI)修复此前 log({refNames:['stash']}) 的语义错误(仅返回最新 stash 内部提交)——apply/pop/drop 按真实 stash@{n} 索引。

验收

结果
check-types / lint / package
test:unit ✅ 52/52
test:integration ✅ 3/3(全命令注册)

后续

Batch 2(Commit 拓扑图 + Console + 工具栏丰富)、Batch 3(行级 partial + inline commit)。

🤖 Generated with Claude Code

…ame/stash-list/ignore/compare/reword;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
@ThreeFish-AI
ThreeFish-AI merged commit 142fb47 into feature/1.x.x Jun 27, 2026
4 checks passed
@ThreeFish-AI
ThreeFish-AI deleted the ThreeFish-AI/parity-recovery-batch1 branch June 27, 2026 15:31
ThreeFish-AI added a commit that referenced this pull request Jul 1, 2026
)

- 根因:buildLogArgs 对 all/checkpointer 下 `git log --all`,--all 遍历 refs/ 全部引用(不止 heads/remotes/tags),含宿主工具注入的 refs/conductor-checkpoints/*(会话快照)与 refs/conductor-archive-heads/*(已删/被取代分支头归档),使游离提交仍可达、画成游离泳道。客户端 /^checkpoint:/ subject 过滤拦不住作为其祖先的游离业务提交,故泄漏;git fetch --prune 仅清 refs/remotes/*,对此类非远端跟踪引用无效(即「prune 后依旧存在」之因)。
- 修复:all 范围由 --all 改为 --branches --tags --remotes(仅三大标准命名空间,排除一切工具注入内部引用);checkpointer 保留 --all(该 Tab 职责即原始完整视图、需触达内部 checkpoint 快照)。客户端 keepCheckpoint 过滤作双保险保留。
- 实证:本仓 --all 取 241 提交、--branches --tags --remotes 取 70;refs 命名空间 135 conductor-checkpoints + 17 conductor-archive-heads,远多于 3 heads/3 remotes/2 tags。
- 测试:更新 tests/unit/log-query.test.ts 断言(all 含三件套且不含 --all;checkpointer 含 --all 且不叠三件套)作回归护栏;check-types/lint/306 单测/production package 全绿。
- 经验沉淀:docs/.agents/issue.md #9。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant