mirror of
https://github.com/go-gitea/gitea
synced 2024-11-12 13:01:19 +01:00
parent
bf7258be9c
commit
8d34c2fab9
1 changed files with 5 additions and 4 deletions
|
@ -93,7 +93,7 @@ func MigrateRepositoryGitData(ctx context.Context, u *user_model.User,
|
||||||
return repo, fmt.Errorf("Failed to remove %s: %v", wikiPath, err)
|
return repo, fmt.Errorf("Failed to remove %s: %v", wikiPath, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = git.Clone(ctx, wikiRemotePath, wikiPath, git.CloneRepoOptions{
|
if err := git.Clone(ctx, wikiRemotePath, wikiPath, git.CloneRepoOptions{
|
||||||
Mirror: true,
|
Mirror: true,
|
||||||
Quiet: true,
|
Quiet: true,
|
||||||
Timeout: migrateTimeout,
|
Timeout: migrateTimeout,
|
||||||
|
@ -104,11 +104,12 @@ func MigrateRepositoryGitData(ctx context.Context, u *user_model.User,
|
||||||
if err := util.RemoveAll(wikiPath); err != nil {
|
if err := util.RemoveAll(wikiPath); err != nil {
|
||||||
return repo, fmt.Errorf("Failed to remove %s: %v", wikiPath, err)
|
return repo, fmt.Errorf("Failed to remove %s: %v", wikiPath, err)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if err := git.WriteCommitGraph(ctx, wikiPath); err != nil {
|
||||||
|
return repo, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err := git.WriteCommitGraph(ctx, wikiPath); err != nil {
|
|
||||||
return repo, err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if repo.OwnerID == u.ID {
|
if repo.OwnerID == u.ID {
|
||||||
|
|
Loading…
Reference in a new issue