refactor: remove unnecessary git command wrapper functions (#38531)

Removed `gitrepo.RunCmd*` functions, because gitcmd.Command works with
Repository directly.

Move some "local filesystem" related function into "localfs.go"
This commit is contained in:
wxiaoguang
2026-07-20 03:17:25 +00:00
committed by GitHub
parent 730b6f2daf
commit 775e3bdb34
53 changed files with 269 additions and 284 deletions
+2 -2
View File
@@ -28,8 +28,8 @@ func TestAPIGitTags(t *testing.T) {
token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository)
// Set up git config for the tagger
_ = gitrepo.GitConfigSet(t.Context(), repo, "user.name", user.Name)
_ = gitrepo.GitConfigSet(t.Context(), repo, "user.email", user.Email)
_ = gitrepo.ManagedConfigSet(t.Context(), repo, "user.name", user.Name)
_ = gitrepo.ManagedConfigSet(t.Context(), repo, "user.email", user.Email)
gitRepo, _ := gitrepo.OpenRepository(repo)
defer gitRepo.Close()