Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write Commit-Graphs in RepositoryDumper #20004

Merged
merged 4 commits into from
Jun 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions services/migrations/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ func (g *RepositoryDumper) CreateRepo(repo *base.Repository, opts base.MigrateOp
if err != nil {
return fmt.Errorf("Clone: %v", err)
}
if err := git.WriteCommitGraph(g.ctx, repoPath); err != nil {
return err
}

if opts.Wiki {
wikiPath := g.wikiPath()
Expand All @@ -179,6 +182,10 @@ func (g *RepositoryDumper) CreateRepo(repo *base.Repository, opts base.MigrateOp
if err := os.RemoveAll(wikiPath); err != nil {
return fmt.Errorf("Failed to remove %s: %v", wikiPath, err)
}
} else {
if err := git.WriteCommitGraph(g.ctx, wikiPath); err != nil {
return err
}
}
zeripath marked this conversation as resolved.
Show resolved Hide resolved
}
}
Expand Down