From 71b3384a503d7f7c407d852960c1d367590e4412 Mon Sep 17 00:00:00 2001 From: a1012112796 <1012112796@qq.com> Date: Sat, 14 Aug 2021 11:15:02 +0800 Subject: [PATCH] fix can't push git notes bug Signed-off-by: a1012112796 <1012112796@qq.com> --- routers/private/hook.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routers/private/hook.go b/routers/private/hook.go index 4bed86f38ac1d..de851788e8ce8 100644 --- a/routers/private/hook.go +++ b/routers/private/hook.go @@ -466,6 +466,8 @@ func HookPreReceive(ctx *gitea_context.PrivateContext) { }) return } + } else if strings.HasPrefix(refFullName, git.NotesRef) { + continue } else { log.Error("Unexpected ref: %s", refFullName) ctx.JSON(http.StatusInternalServerError, private.Response{