From 0f258190e1df4c7a1bbc605ee23ee4d62b98c3ad Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 28 Aug 2024 10:27:54 -0700 Subject: [PATCH] Add a comment for update hook change --- cmd/hook.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/hook.go b/cmd/hook.go index f0ccaa1be7..e8a8b1f4ad 100644 --- a/cmd/hook.go +++ b/cmd/hook.go @@ -290,6 +290,8 @@ Gitea or set your environment appropriately.`, "") return nil } +// runHookUpdate avoid to do heavy operations on update hook because it will be +// invoked for every ref update which does not like pre-receive and post-receive func runHookUpdate(c *cli.Context) error { if isInternal, _ := strconv.ParseBool(os.Getenv(repo_module.EnvIsInternal)); isInternal { return nil