mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 22:01:44 +02:00
Refactor GetRepoRawDiffForFile to avoid unnecessary pipe or goroutine (#36434)
This commit is contained in:
1 parent
5f91c51fa5
commit
e42a1dbb6b
4 files changed
+63
-47
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user