Skip to content
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

add .git-blame-ignore-revs file to maintain provenance #2855

Merged
merged 2 commits into from
Mar 6, 2023

Conversation

lstein
Copy link
Collaborator

@lstein lstein commented Mar 3, 2023

To avoid git blame recording all the autoformatting changes under the name 'lstein', this PR adds a .git-blame-ignore-revs that will ignore any provenance changes that occurred during the recent refactor merge.

To avoid `git blame` recording all the autoformatting changes
under the name 'lstein', this PR adds a `.git-blame-ignore-revs`
that will ignore any provenance changes that occurred during the
recent refactor merge.
@psychedelicious
Copy link
Collaborator

I'm sorry, I've gone to review this twice and never saved my comment.

I tried this PR but it didn't seem to change the git history my IDE reported, but also it didn't cause any issues. Maybe I don't know where to look.

@lstein lstein enabled auto-merge March 6, 2023 03:57
@lstein lstein merged commit 9013371 into main Mar 6, 2023
@lstein lstein deleted the refactor/maintain-blame-provenance branch March 6, 2023 03:58
@lstein
Copy link
Collaborator Author

lstein commented Mar 6, 2023

I'm sorry, I've gone to review this twice and never saved my comment.

I tried this PR but it didn't seem to change the git history my IDE reported, but also it didn't cause any issues. Maybe I don't know where to look.

It doesn't change the commit history, just the output of git blame. Files that were reformatted as a result of the indicated commit will show the last author to make a real change to the code.

@mikeage
Copy link

mikeage commented Jul 21, 2023

I'm sorry, I've gone to review this twice and never saved my comment.

I tried this PR but it didn't seem to change the git history my IDE reported, but also it didn't cause any issues. Maybe I don't know where to look.

I know this is an old PR, but I saw some discussion on Discord about possibly running black on the codebase, and so this would definitely be relevant. If you don't see it helping, you may want to run git config blame.ignoreRevsFile .git-blame-ignore-revs to tell git to use this file; I don't think it's the default, at least in older versions. You may also want to add --global to have this apply to all repos on your machine.

@mikeage mikeage mentioned this pull request Jul 21, 2023
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants