diff options
author | Norwin <noerw@users.noreply.github.com> | 2021-09-27 23:09:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-27 17:09:49 -0400 |
commit | f48dce3176649916c262ab080d5f38a0433f38c0 (patch) | |
tree | d009bc163d78577666dc462d376d697f600ef2d1 /routers/web | |
parent | e8574f2f7d4648b5b3fda48f3e31599a6b9dd40b (diff) | |
download | gitea-f48dce3176649916c262ab080d5f38a0433f38c0.tar.gz gitea-f48dce3176649916c262ab080d5f38a0433f38c0.zip |
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>
Diffstat (limited to 'routers/web')
-rw-r--r-- | routers/web/repo/pull.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index e6d67f3fcc..1b15ea9a79 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -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 } |