mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 01:51:46 +04:00
Migrate sha -> rev
This commit is contained in:
parent
184e22e81f
commit
5651c66995
19 changed files with 215 additions and 107 deletions
|
|
@ -17,7 +17,7 @@ from pre_commit.util import tmpdir
|
|||
|
||||
|
||||
def try_repo(args):
|
||||
ref = args.ref or git.head_sha(args.repo)
|
||||
ref = args.ref or git.head_rev(args.repo)
|
||||
|
||||
with tmpdir() as tempdir:
|
||||
if args.hook:
|
||||
|
|
@ -28,7 +28,7 @@ def try_repo(args):
|
|||
manifest = sorted(manifest, key=lambda hook: hook['id'])
|
||||
hooks = [{'id': hook['id']} for hook in manifest]
|
||||
|
||||
items = (('repo', args.repo), ('sha', ref), ('hooks', hooks))
|
||||
items = (('repo', args.repo), ('rev', ref), ('hooks', hooks))
|
||||
config = {'repos': [collections.OrderedDict(items)]}
|
||||
config_s = ordered_dump(config, **C.YAML_DUMP_KWARGS)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue