mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-26 00:05:28 +02: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:
@@ -16,6 +16,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"gitea.dev/modules/git/gitrepo"
|
||||
"gitea.dev/modules/git/internal" //nolint:depguard // only this file can use the internal type CmdArg, other files and packages should use AddXxx functions
|
||||
"gitea.dev/modules/gtprof"
|
||||
"gitea.dev/modules/log"
|
||||
@@ -261,6 +262,11 @@ func (c *Command) WithDir(dir string) *Command {
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *Command) WithRepo(repo gitrepo.RepositoryFacade) *Command {
|
||||
c.gitDir = gitrepo.RepoLocalPath(repo)
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *Command) WithEnv(env []string) *Command {
|
||||
c.cmdEnv = env
|
||||
return c
|
||||
|
||||
Reference in New Issue
Block a user