Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 authored and AbdulrhmnGhanem committed Aug 23, 2022
1 parent 4d3e6f1 commit 3be1289
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/repository/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 {
Expand Down

0 comments on commit 3be1289

Please sign in to comment.