Rename the main module to gotea.dev and the binary to gotea, and update the application name and English locale. Keep the external gitea.dev/sdk and gitea.dev/actionslib module imports unchanged. Assisted-by: OpenCode:DeepSeek-V4.1-Flash
20 lines
523 B
Go
20 lines
523 B
Go
// Copyright 2022 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package git
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"gotea.dev/modules/git/gitcmd"
|
|
)
|
|
|
|
// WriteCommitGraph write commit graph to speed up repo access
|
|
func WriteCommitGraph(ctx context.Context, repo RepositoryFacade) error {
|
|
if _, _, err := gitcmd.NewCommand("commit-graph", "write").WithRepo(repo).RunStdString(ctx); err != nil {
|
|
return fmt.Errorf("unable to write commit-graph for '%s' : %w", repo.GitRepoLocation(), err)
|
|
}
|
|
return nil
|
|
}
|