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' to the project #37822

Merged
merged 3 commits into from
Jan 26, 2022
Merged

Conversation

Mamaduka
Copy link
Member

Description

PR adds .git-blame-ignore-revs to the project to improve git archeology.

You can read more about the ignore-rev in the following articles:

How has this been tested?

Test using the command below and it should ignore 4857ad5 commit.

git blame --ignore-revs-file .git-blame-ignore-revs -L 66,73 packages/api-fetch/src/middlewares/media-upload.js

Types of changes

DX

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).
  • I've updated related schemas if appropriate. <!-- Reference: https://github.com/WordPress/gutenberg/tree/trunk/schemas ->

@Mamaduka Mamaduka self-assigned this Jan 10, 2022
@Mamaduka Mamaduka added the Developer Experience Ideas about improving block and theme developer experience label Jan 10, 2022
@Mamaduka Mamaduka requested a review from gziolo January 10, 2022 12:20
@Mamaduka
Copy link
Member Author

If you are using GitLens extensions for VS Code, you can add the following settings:

"gitlens.advanced.blame.customArguments": ["--ignore-revs-file", ".git-blame-ignore-revs"],

@gziolo
Copy link
Member

gziolo commented Jan 10, 2022

Is it something that GitHub supports as well or it's only helpful when you run the command?

@gziolo gziolo requested review from a team and gwwar and removed request for a team January 10, 2022 13:03
@Mamaduka
Copy link
Member Author

The feature isn't supported on Github yet - community/community#5033.

@gziolo
Copy link
Member

gziolo commented Jan 10, 2022

The feature isn't supported on Github yet - github/feedback#5033.

Awesome, I commented there community/community#5033 (comment).

@oandregal
Copy link
Member

Can this be problematic if one of the ignored revisions actually introduced a small bug? Think of unintentionally removing something, etc.

@Mamaduka
Copy link
Member Author

@oandregal, I don't think so. You can still run git blame without --ignore-revs.

@gziolo
Copy link
Member

gziolo commented Jan 11, 2022

How about we also include a section in the documentation explaining how to use this file (and maybe also a link in the file to the section). We could put it to the existing document:

https://github.com/WordPress/gutenberg/blob/trunk/docs/contributors/code/git-workflow.md

@noisysocks
Copy link
Member

Didn't know about this 🙂 that's really cool.

@Mamaduka
Copy link
Member Author

Sorry, I got stuck with documentation.

@gziolo, do you think this should be in a new section? Maybe "Advanced" or "Miscellaneous"?

P.S. I had some trouble doing git bisect on the project. It would be nice to include tips for doing it in the docs.

@gziolo
Copy link
Member

gziolo commented Jan 21, 2022

do you think this should be in a new section? Maybe "Advanced" or "Miscellaneous"?

Sounds good, you just pick one 👍🏻

@Mamaduka Mamaduka force-pushed the try/git-blame-ignore-revs branch from 1ffec39 to 5f1fd70 Compare January 26, 2022 09:29
@Mamaduka
Copy link
Member Author

@gziolo added a section in docs.

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Looks great, let’s land it ❤️

@Mamaduka Mamaduka merged commit b56b40d into trunk Jan 26, 2022
@Mamaduka Mamaduka deleted the try/git-blame-ignore-revs branch January 26, 2022 10:21
@github-actions github-actions bot added this to the Gutenberg 12.5 milestone Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer Experience Ideas about improving block and theme developer experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants