This commit is contained in:
@ -92,7 +92,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.CloneWithContext(ctx, wikiRemotePath, wikiPath, git.CloneRepoOptions{
|
if err := git.CloneWithContext(ctx, wikiRemotePath, wikiPath, git.CloneRepoOptions{
|
||||||
Mirror: true,
|
Mirror: true,
|
||||||
Quiet: true,
|
Quiet: true,
|
||||||
Timeout: migrateTimeout,
|
Timeout: migrateTimeout,
|
||||||
@ -103,11 +103,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 {
|
||||||
|
Reference in New Issue
Block a user