mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Replace git rev-list --quiet with git cat-file -e for checking if a revision exists. This changes the operation from O(commits) to O(1). Benchmarks from a large monorepo: - git rev-list --quiet <sha>: 5150ms - git cat-file -e <sha>: 4ms Both commands have the same semantics: return success if the revision exists in the local repo, failure otherwise. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| autoupdate_test.py | ||
| clean_test.py | ||
| gc_test.py | ||
| hazmat_test.py | ||
| hook_impl_test.py | ||
| init_templatedir_test.py | ||
| install_uninstall_test.py | ||
| migrate_config_test.py | ||
| run_test.py | ||
| sample_config_test.py | ||
| try_repo_test.py | ||
| validate_config_test.py | ||
| validate_manifest_test.py | ||