mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Don't return binary file changes in raw PR diffs by default (#17158)
* return diffs without binary file content change * ?binary=true option to restore old behaviour Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
@@ -1345,8 +1345,9 @@ func DownloadPullDiffOrPatch(ctx *context.Context, patch bool) {
|
||||
}
|
||||
|
||||
pr := issue.PullRequest
|
||||
binary := ctx.FormBool("binary")
|
||||
|
||||
if err := pull_service.DownloadDiffOrPatch(pr, ctx, patch); err != nil {
|
||||
if err := pull_service.DownloadDiffOrPatch(pr, ctx, patch, binary); err != nil {
|
||||
ctx.ServerError("DownloadDiffOrPatch", err)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user