Skip to content

Commit 1153e9f

Browse files
committed
Use from to in the clone functions
1 parent f395cbb commit 1153e9f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

modules/gitrepo/clone.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import (
1010
)
1111

1212
// CloneExternalRepo clones an external repository to the managed repository.
13-
func CloneExternalRepo(ctx context.Context, dstRepo Repository, remoteURL string, opts git.CloneRepoOptions) error {
14-
return git.Clone(ctx, remoteURL, repoPath(dstRepo), opts)
13+
func CloneExternalRepo(ctx context.Context, fromRemoteURL string, toRepo Repository, opts git.CloneRepoOptions) error {
14+
return git.Clone(ctx, fromRemoteURL, repoPath(toRepo), opts)
1515
}
1616

1717
// CloneRepoToLocal clones a managed repository to a local path.
18-
func CloneRepoToLocal(ctx context.Context, fromRepo Repository, to string, opts git.CloneRepoOptions) error {
19-
return git.Clone(ctx, repoPath(fromRepo), to, opts)
18+
func CloneRepoToLocal(ctx context.Context, fromRepo Repository, toLocalPath string, opts git.CloneRepoOptions) error {
19+
return git.Clone(ctx, repoPath(fromRepo), toLocalPath, opts)
2020
}

services/repository/migrate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func cloneWiki(ctx context.Context, repo *repo_model.Repository, opts migration.
4444
log.Error("Failed to remove incomplete wiki dir %q, err: %v", storageRepo.RelativePath(), err)
4545
}
4646
}
47-
if err := gitrepo.CloneExternalRepo(ctx, storageRepo, wikiRemoteURL, git.CloneRepoOptions{
47+
if err := gitrepo.CloneExternalRepo(ctx, wikiRemoteURL, storageRepo, git.CloneRepoOptions{
4848
Mirror: true,
4949
Quiet: true,
5050
Timeout: migrateTimeout,

0 commit comments

Comments
 (0)