feat(worktree): add start point option for new branch creation
Allow selecting a base branch when creating new worktree branches Add dropdown to choose start point from existing branches Extend worktree creation flow to support custom branch origins
This commit is contained in:
@@ -3400,12 +3400,12 @@ async function main(options = {}) {
|
||||
return res.status(400).json({ error: 'directory parameter is required' });
|
||||
}
|
||||
|
||||
const { path, branch, createBranch } = req.body;
|
||||
const { path, branch, createBranch, startPoint } = req.body;
|
||||
if (!path || !branch) {
|
||||
return res.status(400).json({ error: 'path and branch are required' });
|
||||
}
|
||||
|
||||
const result = await addWorktree(directory, path, branch, { createBranch });
|
||||
const result = await addWorktree(directory, path, branch, { createBranch, startPoint });
|
||||
res.json(result);
|
||||
} catch (error) {
|
||||
console.error('Failed to add worktree:', error);
|
||||
|
||||
Reference in New Issue
Block a user