diff --git a/pagure/hooks/__init__.py b/pagure/hooks/__init__.py index d6e461f..f5afbbc 100644 --- a/pagure/hooks/__init__.py +++ b/pagure/hooks/__init__.py @@ -70,10 +70,8 @@ class BaseHook(object): # Install the main post-receive file postreceive = os.path.join(hookfolder, cls.hook_type) if not os.path.exists(postreceive): - shutil.copyfile( - os.path.join(hook_files, cls.hook_type), - postreceive) - os.chmod(postreceive, 0755) + os.symlink(os.path.join(hook_files, cls.hook_type), + postreceive) @classmethod def install(cls, repopaths, dbobj, hook_name, filein): # pragma: no cover diff --git a/pagure/hooks/files/post-receive b/pagure/hooks/files/post-receive old mode 100644 new mode 100755 diff --git a/pagure/hooks/files/pre-receive b/pagure/hooks/files/pre-receive old mode 100644 new mode 100755