mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-28 22:40:07 +00:00
refactor: git repo and relative path handling (#38522)
1. simplify "StorageRepo" code 2. simplify git.OpenRepository code 3. by the way, clean up some unused files in git test fixtures.
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"gitea.dev/models/db"
|
||||
repo_model "gitea.dev/models/repo"
|
||||
user_model "gitea.dev/models/user"
|
||||
"gitea.dev/modules/git"
|
||||
"gitea.dev/modules/gitrepo"
|
||||
"gitea.dev/modules/log"
|
||||
"gitea.dev/modules/structs"
|
||||
@@ -162,7 +163,7 @@ func checkCommitGraph(ctx context.Context, logger log.Logger, autofix bool) erro
|
||||
if !isExist {
|
||||
numNeedUpdate++
|
||||
if autofix {
|
||||
if err := gitrepo.WriteCommitGraph(ctx, repo); err != nil {
|
||||
if err := git.WriteCommitGraph(ctx, repo); err != nil {
|
||||
logger.Error("Unable to write commit-graph in %s. Error: %v", repo.FullName(), err)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user