fixed git-worktree-create branch creation
This commit is contained in:
@@ -5,11 +5,9 @@ export default tool({
|
|||||||
description: "Create a git worktree for a branch or PR",
|
description: "Create a git worktree for a branch or PR",
|
||||||
args: {
|
args: {
|
||||||
branch: tool.schema.string().describe("Branch name or PR number"),
|
branch: tool.schema.string().describe("Branch name or PR number"),
|
||||||
directory: tool.schema.string().describe("Worktree directory name (optional)"),
|
|
||||||
},
|
},
|
||||||
async execute(args) {
|
async execute(args) {
|
||||||
const worktreeDir = args.directory || args.branch
|
const result = await $`git worktree add ../worktrees/${args.branch}`.text()
|
||||||
const result = await $`git worktree add ../worktrees/${worktreeDir} ${args.branch}`.text()
|
|
||||||
return result.trim()
|
return result.trim()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user