.git-blame-ignore-revs
One concern people have about taking spelling fixes (or whitespace cleanup for that matter) is that blame is shifted (potentially for large swaths of the codebase) to a drive-by contributor.
It's actually possible to partially address this with the introduction of a file.
Consensus for the filename appears to be .git-blame-ignore-revs
:
- Docs: Support in GitHub for
.git-blame-ignore-revs
(since March 2022) - Rob Allen: Ignoring mass reformatting commits with git blame
- Moxio: Ignoring bulk change commits with git blame
- Used in Chromium
- Request to support in GitLab
This isn't something that a cleanup PR itself should include, because it's reliant on the final commit-refs which aren't known until the PR is merged (especially if a project rebases, but also it'd be painful to maintain while responding to reviews).
But it shouldn't be particularly hard to write a bot which given a bunch of GitHub (or GitLab) PRs (or commits) generated a PR (or just a commit) to update the file.
- Request for GitHub to support generating such entries
- Request for GitHub to warn about rebase/squash merging such entries
It seems like a pretty neat small project, which someone could/should do.
FAQ | Showcase | Event descriptions | Configuration information | Known Issues | Possible features | Deprecations | Release notes | Helpful scripts