From 7812c114c147d61814ff9451517f4cf733534bbd Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Mon, 16 Aug 2021 20:00:59 +0100 Subject: [PATCH] Restore functionality for pushing non-standard refs (Partial #16705) Partial Backport #16705 There was an inadvertent breaking change in #15629 meaning that notes refs and other git extension refs will be automatically rejected. This PR removes this incorrect forced rejection of non-standard refs. Fix #16688 Signed-off-by: Andrew Thornton --- routers/private/hook.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/routers/private/hook.go b/routers/private/hook.go index 9f5579b6ae688..f93632515272a 100644 --- a/routers/private/hook.go +++ b/routers/private/hook.go @@ -392,11 +392,6 @@ func HookPreReceive(ctx *gitea_context.PrivateContext) { }) return } - } else { - log.Error("Unexpected ref: %s", refFullName) - ctx.JSON(http.StatusInternalServerError, private.Response{ - Err: fmt.Sprintf("Unexpected ref: %s", refFullName), - }) } }