1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-06 10:37:20 +00:00

Fix some trivial problems (#34237)

1. Using existing "content" variable in `swift.go`
2. Do not report 500 server error in `GetPullDiffStats` middleware,
otherwise a PR missing ref won't be able to view.
3. Fix the abused "label button" when listing commits, there was too
much padding space, see the screenshot below.
This commit is contained in:
wxiaoguang
2025-04-18 22:56:50 +08:00
committed by GitHub
parent 2683adfcb4
commit ba0deab616
3 changed files with 7 additions and 8 deletions

View File

@ -304,7 +304,7 @@ func formFileOptionalReadCloser(ctx *context.Context, formKey string) (io.ReadCl
if content == "" {
return nil, nil
}
return io.NopCloser(strings.NewReader(ctx.Req.FormValue(formKey))), nil
return io.NopCloser(strings.NewReader(content)), nil
}
// UploadPackageFile refers to https://github.com/swiftlang/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md#endpoint-6