[INFO] Initializing environment for https://github.com/ambv/black.
An unexpected error has occurred: CalledProcessError: Command: ('/Library/Developer/CommandLineTools/usr/libexec/git-core/git', 'reset', 'stable', '--hard')
Return code: 128
Expected return code: 0
Output: (none)
Errors:
fatal: ambiguous argument 'stable': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git
Same error here. It is trying to retrieve some commit/tag called stable, and that has been removed?
The stable tag has been deleted, there's now only calver tags:
https://github.com/psf/black/tags
It changed in March in https://github.com/psf/black/issues/760:
OK, this is solved.
stableis no longer a tag, it is a branch.
The REAME still says advertises the stable tag for .pre-commit-config.yaml:
repos:
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
language_version: python3.6
And:
Finally,
stableis a tag that is pinned to the latest release on PyPI. If you'd rather run on master, this is also an option.
Is it possible to tell pre-commit to use the stable branch?
@hugovk It looks pre-commit does not allow that. Using one of the tags, say 19.10b0 fixes the issue.
Yes, it's best to point pre-commit to immutable tags
Most helpful comment
@hugovk It looks pre-commit does not allow that. Using one of the tags, say
19.10b0fixes the issue.