nodejs / nodejs/node-core-utils
`git node release --promote` doesn't support worktrees
未关闭
已经有一个关联 PR 被合并了。
- #907 来自 @aduh95 —— 已合并
- 主要语言
- JavaScript
- 星标
- 313
- 派生
- 137
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 24
描述
On my computer, I have several git worktrees (one for main, one for each release line, etc).
The promotion fails on the "cherry-pick to main" step, because I'm running it from the v23.x worktree and main is checked out in another one:
✔ Cherry-pick release commit to the default branch? Yes
fatal: 'main' is already used by worktree at '/Users/mzasso/git/nodejs/node'
Error: git checkout,main failed: 128
at ChildProcess.<anonymous> (file:///Users/mzasso/.volta/tools/image/packages/@node-core/utils/lib/node_modules/@node-core/utils/lib/run.js:45:21)
at ChildProcess.emit (node:events:507:28)
at maybeClose (node:internal/child_process:1101:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)
at Process.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 128,
messageOnly: true
}
I don't know if that can be fixed.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在另一个 worktree 中将 main checked out,然后从 release-line worktree 运行 git node release --promote。阅读 cherry-pick 到 main 的步骤及其 git checkout,main 失败情况,然后验证 promotion 是否能够成功,且不会与现有 worktree 发生冲突。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- git, javascript, nodejs
- 领域
- cli, release, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100