summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorMitchel Humpherys <mitchelh@codeaurora.org>2015-01-15 22:40:02 -0800
committerMitchel Humpherys <mitchelh@codeaurora.org>2015-01-15 22:49:08 -0800
commitb9d9efd39413248196161765811b84f6b90cf07d (patch)
tree2258680f0e6698bee893be53a62c0525f29ae9c1 /project.py
parent3eb87cec5cae5f43becfe9fd1ff94de855cac08c (diff)
downloadgit-repo-b9d9efd39413248196161765811b84f6b90cf07d.tar.gz
Don't delete hooks in .git/hooks
We currently delete all hooks in .git/hooks for each project before symlink'ing in the standard project hooks. This can be annoying for users who have installed custom git hooks. There's no reason to delete all existing hooks. Just rip out the deletion code. Change-Id: I5062a6cd20af700f6d6a17b11ad6c94853987c57 Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Diffstat (limited to 'project.py')
-rw-r--r--project.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/project.py b/project.py
index cdce1e84..01ef3149 100644
--- a/project.py
+++ b/project.py
@@ -2121,15 +2121,6 @@ class Project(object):
2121 2121
2122 def _UpdateHooks(self): 2122 def _UpdateHooks(self):
2123 if os.path.exists(self.gitdir): 2123 if os.path.exists(self.gitdir):
2124 # Always recreate hooks since they can have been changed
2125 # since the latest update.
2126 hooks = self._gitdir_path('hooks')
2127 try:
2128 to_rm = os.listdir(hooks)
2129 except OSError:
2130 to_rm = []
2131 for old_hook in to_rm:
2132 os.remove(os.path.join(hooks, old_hook))
2133 self._InitHooks() 2124 self._InitHooks()
2134 2125
2135 def _InitHooks(self): 2126 def _InitHooks(self):