3 ms·
Occasionally batch-fixing syntax makes "git blame" far less useful.
by dbrgn 3y ago
Occasionally batch-fixing syntax makes "git blame" far less useful.
- crabmusket 3y agohttps://akrabat.com/ignoring-revisions-with-git-blame/ https://akrabat.com/ignoring-revisions-with-git-blame/
- dbrgn 3y agoYup, but you need to reference the commit ID, meaning that you always need to create two commits, one for the reformatting, and a second one for updating the .git-blame-ignore-revs file. Additionally, you may not use git rebase, or any other workflow that modifies the history, or the references will be broken. Third, the git config needs to be set per-project (can't be set globally), so all developers need to manually adjust their config, for this feature to be useful. If you value a clean commit history, then simply reformat as part of the code change. With autoformatting on save (e.g. through prettier), that's a complete non-issue anyways.
- 4hg4ufxhy 3y agoUntil you change the formatting rules and the whole codebase is in one diff. This seems to happen at least once a year from my observations.