1
1
espelhamento de https://github.com/go-gitea/gitea sincronizado 2025-12-07 13:28:25 +00:00

Move some functions to gitrepo package (#35543)

Refactor Git command functions to use WithXXX methods instead of
exposing RunOpts.
This change simplifies reuse across gitrepo and improves consistency,
encapsulation, and maintainability of command options.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Esse commit está contido em:
Lunny Xiao
2025-10-07 02:06:51 -07:00
commit de GitHub
commit 69f5ee970c
114 arquivos alterados com 1188 adições e 919 exclusões
+1 -1
Ver Arquivo
@@ -22,7 +22,7 @@ func GetRemoteAddress(ctx context.Context, repoPath, remoteName string) (string,
cmd = gitcmd.NewCommand("config", "--get").AddDynamicArguments("remote." + remoteName + ".url")
}
result, _, err := cmd.RunStdString(ctx, &gitcmd.RunOpts{Dir: repoPath})
result, _, err := cmd.WithDir(repoPath).RunStdString(ctx)
if err != nil {
return "", err
}