Allow multiple hooks with same id in .pre-commit-config.yaml

This commit is contained in:
Anthony Sottile 2014-07-31 08:37:37 -07:00
parent 32b662c35f
commit 62f13aea56
5 changed files with 26 additions and 22 deletions

View file

@ -43,7 +43,7 @@ def _update_repository(repo_config, runner):
new_repo = Repository.create(new_config, runner.store)
# See if any of our hooks were deleted with the new commits
hooks = set(repo.hooks.keys())
hooks = set(hook_id for hook_id, _ in repo.hooks)
hooks_missing = hooks - (hooks & set(new_repo.manifest.hooks.keys()))
if hooks_missing:
raise RepositoryCannotBeUpdatedError(