Update pre-commit version in sample config by mcsitter · Pull Request #1611 · pre-commit/pre-commit

This is a minor change. The sample config doesn't even have the latest major version in it.

This provides the solution to what is proposed in the TODO.
The output from

git -c 'versionsort.suffix=-' ls-remote --exit-code --refs --sort='version:refname' --tags git://github.com/pre-commit/pre-commit-hooks '*.*.*' | tail --lines=1 | cut --delimiter='/' --fields=3

can be directly inserted inplace of the defined rev.

Alternatively one could borrow parts from the autoupdate command. The logic there seems to init a repository and then parses the output from git commands using functions from the util module. The above may or may not be overkill. I have not looked into the details of the different approaches yet. Seems doable though!

If that change is desired, I would be happy to update the PR accordingly.