diff options
author | zeripath <art27@cantab.net> | 2019-12-27 15:21:33 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-27 15:21:33 +0000 |
commit | 154424623a0486a2dd1ab757aaa44d2237116b85 (patch) | |
tree | 6f3a7d6d74bbd5e2b061cf3da8c875c2992aa062 /cmd | |
parent | 3d5f31f77d3f56a954b267fa05f5757c6e538b4e (diff) | |
download | gitea-154424623a0486a2dd1ab757aaa44d2237116b85.tar.gz gitea-154424623a0486a2dd1ab757aaa44d2237116b85.zip |
Remove unnecessary loading of settings in update hook (#9496)
This PR simply makes update an empty command rather than needlessly load the settings for each reference.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/hook.go | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/cmd/hook.go b/cmd/hook.go index 03fa15aabc..ebd230999a 100644 --- a/cmd/hook.go +++ b/cmd/hook.go @@ -181,18 +181,7 @@ Gitea or set your environment appropriately.`, "") } func runHookUpdate(c *cli.Context) error { - if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 { - if setting.OnlyAllowPushIfGiteaEnvironmentSet { - fail(`Rejecting changes as Gitea environment not set. -If you are pushing over SSH you must push with a key managed by -Gitea or set your environment appropriately.`, "") - } else { - return nil - } - } - - setup("hooks/update.log", false) - + // Update is empty and is kept only for backwards compatibility return nil } |