mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-16 09:53:24 +09:00
refactor: clean up git repo and model migration packages (#38564)
enable the golangci depguard lint rule: deny "models" and its sub packages in "modelmigration" package.
This commit is contained in:
@@ -9,7 +9,7 @@ package git
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"gitea.dev/modules/git/gitcmd"
|
||||
"gitea.dev/modules/git/gitrepo"
|
||||
"gitea.dev/modules/setting"
|
||||
|
||||
"github.com/go-git/go-billy/v5"
|
||||
@@ -30,7 +30,7 @@ type Repository struct {
|
||||
}
|
||||
|
||||
func openRepositoryInternal(gitRepo *Repository) error {
|
||||
repoPath := gitcmd.RepoLocalPath(gitRepo)
|
||||
repoPath := gitrepo.RepoLocalPath(gitRepo)
|
||||
fs := osfs.New(repoPath)
|
||||
_, err := fs.Stat(".git")
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user