Implement pre-commit autoupdate --freeze

This commit is contained in:
Anthony Sottile 2019-12-28 12:25:30 -08:00
parent 32ce682238
commit 8a3c740f9e
5 changed files with 314 additions and 260 deletions

View file

@ -175,6 +175,10 @@ def main(argv=None):
'tagged version (the default behavior).'
),
)
autoupdate_parser.add_argument(
'--freeze', action='store_true',
help='Store "frozen" hashes in `rev` instead of tag names',
)
autoupdate_parser.add_argument(
'--repo', dest='repos', action='append', metavar='REPO',
help='Only update this repository -- may be specified multiple times.',
@ -313,6 +317,7 @@ def main(argv=None):
return autoupdate(
args.config, store,
tags_only=not args.bleeding_edge,
freeze=args.freeze,
repos=args.repos,
)
elif args.command == 'clean':