Skip to content

git node release --promote doesn't support worktrees #906

Open
@targos

Description

@targos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions