Refactor GetRepoRawDiffForFile to avoid unnecessary pipe or goroutine (#36434)

This commit is contained in:
wxiaoguang
2026-01-23 10:10:11 +08:00
committed by GitHub
parent 5f91c51fa5
commit e42a1dbb6b
4 changed files with 63 additions and 47 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ func CherryPickPost(ctx *context.Context) {
if parsed.form.Revert {
err = gitrepo.GetReverseRawDiff(ctx, ctx.Repo.Repository, fromCommitID, buf)
} else {
err = git.GetRawDiff(ctx.Repo.GitRepo, fromCommitID, "patch", buf)
err = git.GetRawDiff(ctx.Repo.GitRepo, fromCommitID, git.RawDiffPatch, buf)
}
if err == nil {
opts.Content = buf.String()