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

.git-blame-ignore-revs: Ignore black format change #25609

Merged
merged 1 commit into from
Nov 25, 2023

Conversation

Ryanf55
Copy link
Collaborator

@Ryanf55 Ryanf55 commented Nov 22, 2023

This reduces commit noise in Tools/ros2 by ignoring our mass-format commit when we switched to black. I'd like to propose this as a way to start ignoring commits in ArduPilot that are format-only.

For more info on how this feature works, see here:
https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view

This approach is used on other major repos with >1M Lines of Code like GDAL:
https://gdal.org/development/rfc/rfc69_cplusplus_formatting.html

This strategy can be used in the future to ignore things like

  • flake8 format
  • astyle format changes
  • Fixing incorrect indent errors:

Using automated formatting reduces developer time, so that people like Randy do not need to spend cognitive load nitpicking style and instead focus on logic errors and other things that affect behavior or maintainability.

Yes, refactor and automated tools need to be applied carefully because it makes backporting difficult. This PR in no way changes that existing process, but it does reduce the developer effect of mass-changes on the git blame.

@magicrub
Copy link
Contributor

As long as it's only git-blame being effected, I don't see a big deal about it. Does this also effect GitHub's web-based git blame interface?

@Ryanf55
Copy link
Collaborator Author

Ryanf55 commented Nov 22, 2023

As long as it's only git-blame being effected, I don't see a big deal about it. Does this also effect GitHub's web-based git blame interface?

Yes, it does affect Github's web-based blame.

The commit still shows at the top, as well as the folder:
image

And here, it still shows as changed
image

It only affects when you click to view blame, the left column for commits is no longer polluted.
image

@magicrub magicrub merged commit 4ffcc56 into ArduPilot:master Nov 25, 2023
86 checks passed
@Ryanf55 Ryanf55 deleted the git-blame-ignore-revs-for-dds branch November 25, 2023 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants