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