Move some functions to gitrepo package to reduce RepoPath reference directly (#36126)

This commit is contained in:
Lunny Xiao
2025-12-11 16:15:40 -08:00
committed by GitHub
parent f25409fab8
commit d2a372fc59
18 changed files with 122 additions and 90 deletions

View File

@@ -18,3 +18,7 @@ func CloneExternalRepo(ctx context.Context, fromRemoteURL string, toRepo Reposit
func CloneRepoToLocal(ctx context.Context, fromRepo Repository, toLocalPath string, opts git.CloneRepoOptions) error {
return git.Clone(ctx, repoPath(fromRepo), toLocalPath, opts)
}
func Clone(ctx context.Context, fromRepo, toRepo Repository, opts git.CloneRepoOptions) error {
return git.Clone(ctx, repoPath(fromRepo), repoPath(toRepo), opts)
}