Index: gclient_scm.py |
diff --git a/gclient_scm.py b/gclient_scm.py |
index 67d68674e04fd5f0c42084529551a1fa35c181f5..119bdc175b213b17d8d6615b72f288f76a2ecd2b 100644 |
--- a/gclient_scm.py |
+++ b/gclient_scm.py |
@@ -308,6 +308,14 @@ class GitWrapper(SCMWrapper): |
files = self._Capture(['ls-files']).splitlines() |
file_list.extend([os.path.join(self.checkout_path, f) for f in files]) |
+ def _DisableHooks(self): |
+ hook_dir = os.path.join(self.checkout_path, '.git', 'hooks') |
+ if not os.path.isdir(hook_dir): |
+ return |
+ for f in os.listdir(hook_dir): |
+ if not f.endswith('.sample'): |
+ os.remove(os.path.join(hook_dir, f)) |
+ |
def update(self, options, args, file_list): |
"""Runs git to update or transparently checkout the working copy. |
@@ -321,6 +329,8 @@ class GitWrapper(SCMWrapper): |
self._CheckMinVersion("1.6.6") |
+ self._DisableHooks() |
+ |
# If a dependency is not pinned, track the default remote branch. |
default_rev = 'refs/remotes/%s/master' % self.remote |
url, deps_revision = gclient_utils.SplitUrlRevision(self.url) |