]> source.dussan.org Git - gitea.git/commitdiff
Restore functionality for pushing non-standard refs (Partial #16705) (#16706)
authorzeripath <art27@cantab.net>
Tue, 17 Aug 2021 08:24:47 +0000 (09:24 +0100)
committerGitHub <noreply@github.com>
Tue, 17 Aug 2021 08:24:47 +0000 (10:24 +0200)
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 <art27@cantab.net>
routers/private/hook.go

index 9f5579b6ae688f03700cc5eba72aa7c2030cc4fc..f93632515272a210229414a1d3cd1f3e07d95686 100644 (file)
@@ -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),
-                       })
                }
        }