mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-05-06 15:29:14 -05:00
Migrate sha -> rev
This commit is contained in:
+2
-2
@@ -78,11 +78,11 @@ def config_with_local_hooks():
|
||||
))
|
||||
|
||||
|
||||
def make_config_from_repo(repo_path, sha=None, hooks=None, check=True):
|
||||
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 = OrderedDict((
|
||||
('repo', 'file://{}'.format(repo_path)),
|
||||
('sha', sha or git.head_sha(repo_path)),
|
||||
('rev', rev or git.head_rev(repo_path)),
|
||||
(
|
||||
'hooks',
|
||||
hooks or [OrderedDict((('id', hook['id']),)) for hook in manifest],
|
||||
|
||||
Reference in New Issue
Block a user