feat: vendor gitea 1.16.2

This commit is contained in:
2026-06-02 08:36:01 +00:00
parent 247cd60f69
commit 54798b4615
2145 changed files with 162965 additions and 126447 deletions
@@ -8,6 +8,7 @@ import (
"net/http"
"code.gitea.io/gitea/modules/gtprof"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/reqctx"
)
@@ -40,11 +41,23 @@ func MarkLongPolling(resp http.ResponseWriter, req *http.Request) {
record.lock.Lock()
record.isLongPolling = true
record.logLevel = log.TRACE
record.lock.Unlock()
}
func MarkLogLevelTrace(resp http.ResponseWriter, req *http.Request) {
record, ok := req.Context().Value(contextKey).(*requestRecord)
if !ok {
return
}
record.lock.Lock()
record.logLevel = log.TRACE
record.lock.Unlock()
}
// UpdatePanicError updates a context's error info, a panic may be recovered by other middlewares, but we still need to know that.
func UpdatePanicError(ctx context.Context, err any) {
func UpdatePanicError(ctx context.Context, err error) {
record, ok := ctx.Value(contextKey).(*requestRecord)
if !ok {
return