{"id":40129353,"url":"https://github.com/berquist/validate-git-blame-ignore-revs","last_synced_at":"2026-01-19T13:31:35.427Z","repository":{"id":321095091,"uuid":"1041769607","full_name":"berquist/validate-git-blame-ignore-revs","owner":"berquist","description":"Ensure a .git-blame-ignore-revs file is correct","archived":false,"fork":false,"pushed_at":"2026-01-14T09:59:01.000Z","size":88,"stargazers_count":0,"open_issues_count":17,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-14T13:47:38.025Z","etag":null,"topics":["git","git-blame","pre-commit-hook"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/berquist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-21T01:38:17.000Z","updated_at":"2026-01-14T09:59:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"9898bca6-50f2-4c01-92d2-fec408114eba","html_url":"https://github.com/berquist/validate-git-blame-ignore-revs","commit_stats":null,"previous_names":["berquist/validate-git-blame-ignore-revs"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/berquist/validate-git-blame-ignore-revs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquist%2Fvalidate-git-blame-ignore-revs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquist%2Fvalidate-git-blame-ignore-revs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquist%2Fvalidate-git-blame-ignore-revs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquist%2Fvalidate-git-blame-ignore-revs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berquist","download_url":"https://codeload.github.com/berquist/validate-git-blame-ignore-revs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquist%2Fvalidate-git-blame-ignore-revs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28569190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T12:50:50.164Z","status":"ssl_error","status_checked_at":"2026-01-19T12:50:42.704Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","git-blame","pre-commit-hook"],"created_at":"2026-01-19T13:31:35.374Z","updated_at":"2026-01-19T13:31:35.422Z","avatar_url":"https://github.com/berquist.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Validate `.git-blame-ignore-revs`\n\nValidate a [file used by Git for ignoring revisions in `git blame` output](https://www.michaelheap.com/git-ignore-rev/).\n\nBy convention, this file is named `.git-blame-ignore-revs` and is located at the top level or base of the repository.\n\n## Installation\n\nThe package is [currently not available on PyPI](https://github.com/berquist/validate-git-blame-ignore-revs/issues/11).\nIn the meantime, it is available in [VCS format](https://pip.pypa.io/en/stable/topics/vcs-support/).\nFor example, to use with [uv](https://docs.astral.sh/uv/guides/tools/#requesting-specific-versions):\n\n```bash\nuvx git+https://github.com/berquist/validate-git-blame-ignore-revs@v0.1 --help\n```\n\n## Recommended usage\n\nFor general use, we recommend installation as a pre-commit hook.\nIf the file isn't modified, the hook won't run, so it won't slow down pre-commit.\nThe actual time to run will vary depending on the arguments used and the size of the ignore file,\nbut on [this commit](https://github.com/cclib/cclib/commit/188c8328d80466fa4d0a4f15c486864072c6ae86)\nwith the strictest settings it takes under five seconds.\n\nFor the first usage in a repository, it would be better to either use it directly from the command line\nor run it with pre-commit using the `-a` flag.\n\n## Arguments and usage as a command-line tool\n\n```console\nusage: validate-git-blame-ignore-revs [-h] [--call-git] [--strict-comments] [--strict-comments-git] [--pre-commit-ci] file_path\n\nValidate a .git-blame-ignore-revs file.\n\npositional arguments:\n  file_path             Path to the .git-blame-ignore-revs file.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --call-git            Ensure each commit is in the history of the checked-out branch.\n  --strict-comments     Require each commit line to have one or more comment lines above it.\n  --strict-comments-git\n                        Ensure the comment above each commit matches the first part of the commit message. Requires --strict-comments and --call-git.\n  --pre-commit-ci       Ensure all commits authored by pre-commit-ci[bot] are present in the file. Requires --call-git.\n```\n\nWhen called without any optional arguments,\n`validate-git-blame-ignore-revs` will only check that the syntax of the ignore file is correct.\nThis means each line is either whitespace, is a comment (starts with `#`),\nor is a 40-character hex string.\nIt may be useful for fast sanity checks in order to avoid calling Git.\nAll other arguments except for `--strict-comments` require calling Git,\nsince the information requires checking history.\n\n## Use as a pre-commit hook\n\nAdd the following to your `.pre-commit-config.yaml` under the `repos` list:\n\n```yaml\n  - repo: https://github.com/berquist/validate-git-blame-ignore-revs\n    rev: v0.1\n    hooks:\n      - id: validate-git-blame-ignore-revs\n\n```\n\nThe default file to look for is `.git-blame-ignore-revs` at the top level of the repository.\nThe default arguments are the strictest available (`--call-git --strict-comments --strict-comments-git --pre-commit-ci`).\nThe full configuration can be seen in `.pre-commit-hooks.yaml`.\n\n### Changing options via arguments\n\nIn order to change the arguments used, [specify `args`](https://pre-commit.com/#passing-arguments-to-hooks).\nFor example, to only check the syntax of the file and that each commit is present in Git history,\n\n```yaml\n  - repo: https://github.com/berquist/validate-git-blame-ignore-revs\n    rev: v0.1\n    hooks:\n      - id: validate-git-blame-ignore-revs\n        args: [--call-git]\n```\n\n### Changing filename\n\nIf your ignore revs file is named something other than `.git-blame-ignore-revs`,\noverride the regular expression used for [`files`](https://pre-commit.com/#hooks-files).\nFor example, if your file has the idiomatic name but is located in a `dev` subdirectory,\n\n```yaml\n  - repo: https://github.com/berquist/validate-git-blame-ignore-revs\n    rev: v0.1\n    hooks:\n      - id: validate-git-blame-ignore-revs\n        files: '^dev/\\.git-blame-ignore-revs$'\n```\n\n## Use as a GitHub Action\n\n[TODO](https://github.com/berquist/validate-git-blame-ignore-revs/issues/2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberquist%2Fvalidate-git-blame-ignore-revs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberquist%2Fvalidate-git-blame-ignore-revs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberquist%2Fvalidate-git-blame-ignore-revs/lists"}