1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Pass gitRepo down to GetRawDiff, since its used for main repo and wiki (#19461)

as per https://github.com/go-gitea/gitea/pull/19449#issuecomment-1105283931

pass gitRepo down to GetRawDiff, since its used for main repo and wiki
This commit is contained in:
6543
2022-04-25 20:45:18 +02:00
committed by GitHub
parent 7c164d5a91
commit 1ebb30e41b
4 changed files with 23 additions and 31 deletions

View File

@@ -151,7 +151,7 @@ func CherryPickPost(ctx *context.Context) {
return
}
} else {
if err := git.GetRawDiff(ctx, ctx.Repo.Repository.RepoPath(), sha, git.RawDiffType("patch"), buf); err != nil {
if err := git.GetRawDiff(ctx.Repo.GitRepo, sha, git.RawDiffType("patch"), buf); err != nil {
if git.IsErrNotExist(err) {
ctx.NotFound("GetRawDiff", errors.New("commit "+ctx.Params(":sha")+" does not exist."))
return