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

chore: Improve blame view by ignoring formatting from Prettier #1409

Merged
merged 1 commit into from
Jul 20, 2022

Conversation

filipewl
Copy link
Contributor

What's the purpose of this pull request?

🧹  This is more for Git housekeeping than the FastStore itself.

Create a .git-blame-ignore-revs file to list commits that should be ignored from the blame view. This is useful to remove the noise introduced by aesthetic changes such as code formatting: when viewing the blame for a file, we can omit commits that only changed formatting/indentation so we can quickly see what matters.

I had mentioned that #1369 was a good candidate to test this feature (that is relatively new in GH, not Git itself).

How does it work?

By adding a commit SHA/ID to be ignored in the .git-blame-ignore-revs file.

How to test it?

See how on Before the changes from the commit "fix: prettier format files", which were only formatting, hid the original blame lines. On After they're restored because that commit is ignored.

Before After
CleanShot 2022-07-19 at 20 35 02@2x CleanShot 2022-07-19 at 20 35 11@2x

References

@filipewl filipewl requested a review from a team as a code owner July 19, 2022 23:40
@filipewl filipewl self-assigned this Jul 19, 2022
@vercel
Copy link

vercel bot commented Jul 19, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
faststore ✅ Ready (Inspect) Visit Preview Jul 19, 2022 at 11:40PM (UTC)

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ea45a50:

Sandbox Source
Store UI Typescript Configuration

@filipewl filipewl requested review from a team and removed request for a team July 20, 2022 14:24
Copy link
Member

@eduardoformiga eduardoformiga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL! Nice One 👏

@filipewl filipewl changed the title chore: Improve blame view by ignoring formatting changes from Prettier chore: Improve blame view by ignoring formatting from Prettier Jul 20, 2022
@filipewl filipewl merged commit 08bfca1 into main Jul 20, 2022
@filipewl filipewl deleted the chore/ignore-prettier-diffs branch July 20, 2022 14:51
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.

2 participants