From 8534f3602b4efaf8781e9bc8a7dba7051abecb5d Mon Sep 17 00:00:00 2001 From: RhodeCode Admin Date: Fri, 16 Feb 2024 07:45:24 +0100 Subject: [PATCH] fix(ssh): add pull fix into pre_pull hook --- rhodecode/apps/ssh_support/lib/backends/git.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rhodecode/apps/ssh_support/lib/backends/git.py b/rhodecode/apps/ssh_support/lib/backends/git.py index 1334b8f5..5ee88bab 100644 --- a/rhodecode/apps/ssh_support/lib/backends/git.py +++ b/rhodecode/apps/ssh_support/lib/backends/git.py @@ -53,9 +53,10 @@ class GitTunnelWrapper(object): scm_extras = self.server.update_environment(action=action, extras=extras) - hook_response = hooks.git_pre_pull(scm_extras) - pre_pull_messages = hook_response.output - sys.stdout.write(pre_pull_messages) + if action == "pull": + hook_response = hooks.git_pre_pull(scm_extras) + pre_pull_messages = hook_response.output + sys.stdout.write(pre_pull_messages) self.create_hooks_env() result = subprocess.run(self.command(), shell=True)