You've already forked agentic-coding-workflow
git 逻辑
This commit is contained in:
@@ -5,7 +5,9 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Clone 把 remoteURL 上的 branch 浅克隆到 dst。dst 不能预先存在。
|
||||
// Clone 把 remoteURL 克隆到 dst(初始 checkout 指定 branch)。dst 不能预先存在。
|
||||
// 不加 --single-branch:保留全部远端分支,使后续 fetch --all 与基于其他分支建
|
||||
// worktree 可行。
|
||||
func (r *DefaultRunner) Clone(ctx context.Context, dst, remoteURL, branch string, cred *Credential) error {
|
||||
ctx, cancel := withCtx(ctx, r.cfg.CloneTimeout)
|
||||
defer cancel()
|
||||
@@ -14,7 +16,7 @@ func (r *DefaultRunner) Clone(ctx context.Context, dst, remoteURL, branch string
|
||||
return fmt.Errorf("credential env: %w", err)
|
||||
}
|
||||
defer cleanup()
|
||||
args := []string{"clone", "--branch", branch, "--single-branch", remoteURL, dst}
|
||||
args := []string{"clone", "--branch", branch, remoteURL, dst}
|
||||
_, _, err = r.exec(ctx, "", env, args...)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user