From 92224bf51cb93290a1a567c3839596214cd71a46 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 06 2015 15:37:57 +0000 Subject: Reduce code duplication by using the progit.get_repo_path when setting up the hooks --- diff --git a/progit/hooks/__init__.py b/progit/hooks/__init__.py index 8c8113d..b6f1058 100644 --- a/progit/hooks/__init__.py +++ b/progit/hooks/__init__.py @@ -11,7 +11,7 @@ import os import shutil -from progit import APP +from progit import APP, get_repo_path class BaseHook(object): @@ -25,9 +25,7 @@ class BaseHook(object): ''' Install the generic post-receive hook that allow us to call multiple post-receive hooks as set per plugin. ''' - repopath = os.path.join(APP.config['GIT_FOLDER'], project.path) - if project.is_fork: - repopath = os.path.join(APP.config['FORK_FOLDER'], project.path) + repopath = get_repo_path(project) hook_files = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'files')