Move some functions to gitrepo package (#35503)

This commit is contained in:
Lunny Xiao
2025-09-26 10:14:20 -07:00
committed by GitHub
parent 7bf2972379
commit 1f32170060
22 changed files with 190 additions and 198 deletions

View File

@@ -0,0 +1,15 @@
// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package gitrepo
import (
"context"
"code.gitea.io/gitea/modules/git/gitcmd"
)
func runCmdString(ctx context.Context, repo Repository, cmd *gitcmd.Command) (string, error) {
res, _, err := cmd.RunStdString(ctx, &gitcmd.RunOpts{Dir: repoPath(repo)})
return res, err
}