mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-24 04:22:50 +02:00
refactor: hide git repo path details from more packages (#38601)
Remove `RepoPath` from "models/repo" package, remove `UserPath` from "models/user" package, use `WithRepo` for more places, fine tune tests.
This commit is contained in:
@@ -1186,9 +1186,9 @@ revert
|
||||
from :2
|
||||
D test2.txt
|
||||
D test10.txt`
|
||||
require.NoError(t, gitcmd.NewCommand("fast-import").WithDir(pull.BaseRepo.RepoPath()).WithStdinBytes([]byte(stdin)).Run(t.Context()))
|
||||
require.NoError(t, gitcmd.NewCommand("fast-import").WithRepo(pull.BaseRepo).WithStdinBytes([]byte(stdin)).Run(t.Context()))
|
||||
|
||||
gitRepo, err := git.OpenRepositoryLocal(pull.BaseRepo.RepoPath())
|
||||
gitRepo, err := git.OpenRepository(pull.BaseRepo)
|
||||
assert.NoError(t, err)
|
||||
defer gitRepo.Close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user