diff options
| author | Conley Owens <cco3@android.com> | 2015-01-28 20:29:04 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-01-28 20:29:05 +0000 |
| commit | d37d43f036dfbbdee6a3979b73d1dce3d3b96e19 (patch) | |
| tree | 70b5cf21c8f5cb0919a6e61840bdc349f3d72265 | |
| parent | 7bdac71087a51be4655a0280a719a0b401614e47 (diff) | |
| parent | b9d9efd39413248196161765811b84f6b90cf07d (diff) | |
| download | git-repo-d37d43f036dfbbdee6a3979b73d1dce3d3b96e19.tar.gz | |
Merge "Don't delete hooks in .git/hooks"
| -rw-r--r-- | project.py | 9 |
1 files changed, 0 insertions, 9 deletions
| @@ -2128,15 +2128,6 @@ class Project(object): | |||
| 2128 | 2128 | ||
| 2129 | def _UpdateHooks(self): | 2129 | def _UpdateHooks(self): |
| 2130 | if os.path.exists(self.gitdir): | 2130 | if os.path.exists(self.gitdir): |
| 2131 | # Always recreate hooks since they can have been changed | ||
| 2132 | # since the latest update. | ||
| 2133 | hooks = self._gitdir_path('hooks') | ||
| 2134 | try: | ||
| 2135 | to_rm = os.listdir(hooks) | ||
| 2136 | except OSError: | ||
| 2137 | to_rm = [] | ||
| 2138 | for old_hook in to_rm: | ||
| 2139 | os.remove(os.path.join(hooks, old_hook)) | ||
| 2140 | self._InitHooks() | 2131 | self._InitHooks() |
| 2141 | 2132 | ||
| 2142 | def _InitHooks(self): | 2133 | def _InitHooks(self): |
