Ver código fonte

fix #19545 (#19563)

tags/v1.18.0-dev
6543 2 anos atrás
pai
commit
8d34c2fab9
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 5 adições e 4 exclusões
  1. 5
    4
      modules/repository/repo.go

+ 5
- 4
modules/repository/repo.go Ver arquivo

@@ -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 {

Carregando…
Cancelar
Salvar