nodejs / nodejs/node-core-utils
`git node release --promote` doesn't support worktrees
Open
A pull request for this has already been merged.
- #907 by @aduh95 — merged
- Dominant language
- JavaScript
- Stars
- 314
- Forks
- 137
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 24
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running git node release --promote from a release-line worktree while main is checked out in another worktree. Read the cherry-pick-to-main step and its git checkout,main failure, then verify that promotion succeeds without conflicting with the existing worktree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, javascript, nodejs
- Domain
- cli, release, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100