tokarchuk/v1.17
6543 3 years ago committed by GitHub
parent bf7258be9c
commit 8d34c2fab9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      modules/repository/repo.go

@ -93,7 +93,7 @@ func MigrateRepositoryGitData(ctx context.Context, u *user_model.User,
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,
Quiet: true,
Timeout: migrateTimeout,
@ -104,11 +104,12 @@ func MigrateRepositoryGitData(ctx context.Context, u *user_model.User,
if err := util.RemoveAll(wikiPath); err != nil {
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 {

Loading…
Cancel
Save