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",
|
||||
args: {
|
||||
branch: tool.schema.string().describe("Branch name or PR number"),
|
||||
directory: tool.schema.string().describe("Worktree directory name (optional)"),
|
||||
},
|
||||
async execute(args) {
|
||||
const worktreeDir = args.directory || args.branch
|
||||
const result = await $`git worktree add ../worktrees/${worktreeDir} ${args.branch}`.text()
|
||||
const result = await $`git worktree add ../worktrees/${args.branch}`.text()
|
||||
return result.trim()
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user