-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Adds git-blame-ignore-revs file #12839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thank you for the pull request, @mzschwartz5! ✅ We can confirm we have a CLA on file for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mzschwartz5, I definitely like the idea of this but have a couple comments
- Please add comments to the new ignore file so we know what those commits are. The Github docs also suggest this.
- Please add the commit from the prettier v3 upgrade, this also touches a majority of files: #12206. Commit
09a719b8fb4616ecbcd7370e81dcdc998b64b6e2
- I think it does make sense to include the gitlens setting in our workspace settings. It's not (currently) in our recommended extensions list but I assume a lot of people use it and it's specific to our project so could be helpful?
- counter point, maybe it's generic enough it should be in my user settings? But if the file doesn't exist does it break gitlens's blame?
- If it's not added to our workspace settings then it might also be good to call out in the dev setup guide
- Is the config command necessary? If so maybe we should add it to the developer guide as part of the setup process so all devs can use it.
- Alternatively, is there a way to share common git settings so it's automatically set up for everyone? I've never looked into that so maybe not
@jjspace |
I was looking into this a bit more and per this comment it seems gitlens will respect the git setting itself and no workspace setting is required. I tested it and it seems to work as expected, I say we leave it out for now and focus on the gitconfig itself.
Regardless it should probably be documented in the developer setup guide. If we're already going to have people run a command it might make more sense to opt for a generic one. Then we could potentially add more settings to it later and everyone will already be set up for it to work. I like the include statement like this SO answer points out: https://stackoverflow.com/a/18330114/7416863 |
|
No strong opinions on either option, but a 👍 for documenting in in the build/setup guide. |
@jjspace Added documentation on these changes - should be good to merge now. |
Description
Added a
git-blame-ignore-revs
file. This allows blame to skip certain pervasive changes. I included two major offenders to start: the commit that ran prettier on the whole codebase, and the commit that changed var/let to const.To use the file:
git config blame.ignoreRevsFile .git-blame-ignore-revs
If using gitlens in vscode, you can add this setting:
Issue number and link
Testing plan
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change