pre-commit gc

This commit is contained in:
Anthony Sottile 2019-01-01 22:01:10 -08:00
parent d7f5c6f979
commit 9e34e6e316
12 changed files with 412 additions and 116 deletions

View file

@ -82,7 +82,7 @@ def modify_config(path='.', commit=True):
git_commit(msg=modify_config.__name__, cwd=path)
def config_with_local_hooks():
def sample_local_config():
return {
'repo': 'local',
'hooks': [{
@ -94,6 +94,10 @@ def config_with_local_hooks():
}
def sample_meta_config():
return {'repo': 'meta', 'hooks': [{'id': 'check-useless-excludes'}]}
def make_config_from_repo(repo_path, rev=None, hooks=None, check=True):
manifest = load_manifest(os.path.join(repo_path, C.MANIFEST_FILE))
config = {