Skip to content

[git] Ignore python style LSC #33138 in git blame#33396

Merged
sergiitk merged 1 commit intogrpc:masterfrom
sergiitk:git-blame-ignore-revs-black
Jun 10, 2023
Merged

[git] Ignore python style LSC #33138 in git blame#33396
sergiitk merged 1 commit intogrpc:masterfrom
sergiitk:git-blame-ignore-revs-black

Conversation

@sergiitk
Copy link
Copy Markdown
Member

@sergiitk sergiitk commented Jun 9, 2023

PR #33138 is the Large Scale Change in which python style is changed from yapf to black. Nearly all python files were reformatted. This PR configures git clients supporting .git-blame-ignore-revs feature to show the original author in git blame.

Details: https://black.readthedocs.io/en/stable/guides/introducing_black_to_your_project.html
GitHub uses this feature by default: https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
Local git clients can enable this feature with git config blame.ignoreRevsFile .git-blame-ignore-revs.

cc @gnossen @XuanWang-Amos @ctiller

@sergiitk sergiitk requested a review from veblush June 9, 2023 23:02
@sergiitk sergiitk added the release notes: no Indicates if PR should not be in release notes label Jun 9, 2023
@sergiitk sergiitk changed the title [Meta] Ignore python style LSC #33138 in git blame [git] Ignore python style LSC #33138 in git blame Jun 9, 2023
@sergiitk sergiitk enabled auto-merge (squash) June 9, 2023 23:06
@gnossen
Copy link
Copy Markdown
Contributor

gnossen commented Jun 9, 2023

This is amazing! I'm surprised I'd never heard of this.

@sergiitk sergiitk merged commit 243720e into grpc:master Jun 10, 2023
@sergiitk sergiitk deleted the git-blame-ignore-revs-black branch June 10, 2023 00:48
mario-vimal pushed a commit to mario-vimal/grpc that referenced this pull request Jun 15, 2023
PR grpc#33138 is the Large Scale Change in which python style is changed
from yapf to black. Nearly all python files were reformatted. This PR
configures git clients supporting `.git-blame-ignore-revs` feature to
show the original author in `git blame`.

Details:
https://black.readthedocs.io/en/stable/guides/introducing_black_to_your_project.html
GitHub uses this feature by default:
https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
Local git clients can enable this feature with `git config
blame.ignoreRevsFile .git-blame-ignore-revs`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants