You've already forked agentic-coding-workflow
git 逻辑
This commit is contained in:
@@ -46,7 +46,7 @@ func (s *worktreeService) Create(ctx context.Context, c Caller, wsID uuid.UUID,
|
||||
return nil, errs.Wrap(err, errs.CodeInvalidInput, "invalid base branch")
|
||||
}
|
||||
wtPath := WorktreePath(s.dataDir, wsID, in.Branch)
|
||||
if err := s.gitr.WorktreeAdd(ctx, ws.MainPath, in.Branch, wtPath); err != nil {
|
||||
if err := s.gitr.WorktreeAdd(ctx, ws.MainPath, in.Branch, wtPath, "origin/"+base); err != nil {
|
||||
if git.IsConflict(err) {
|
||||
return nil, errs.Wrap(err, errs.CodeWorktreeBranchConflict, "branch already used")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user