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 file #6362

Merged
merged 1 commit into from
May 5, 2021
Merged

Add git blame ignore file #6362

merged 1 commit into from
May 5, 2021

Conversation

mtreinish
Copy link
Member

Summary

This commit adds a new file with the SHA1 of commits to ignore when
running git blame. This is important because of the recent adoption of
black as our code formatting tool in #6361 we caused a large amount of
code churn to change the code formatting. However using the ignore file
is a local opt-in feature for git and not something we can enable
globally by default. To facilitate this a section is added to the bottom
of the contributing guide to document how this file can be used.

Details and comments

This commit adds a new file with the SHA1 of commits to ignore when
running git blame. This is important because of the recent adoption of
black as our code formatting tool in Qiskit#6361 we caused a large amount of
code churn to change the code formatting. However using the ignore file
is a local opt-in feature for git and not something we can enable
globally by default. To facilitate this a section is added to the bottom
of the contributing guide to document how this file can be used.
@mtreinish mtreinish requested a review from a team as a code owner May 5, 2021 14:26
Copy link
Member

@levbishop levbishop left a comment

Choose a reason for hiding this comment

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

Looks good

@mergify mergify bot merged commit dc592ff into Qiskit:main May 5, 2021
@1ucian0 1ucian0 added the Changelog: None Do not include in changelog label Jun 25, 2021
@mtreinish mtreinish deleted the ignore-black branch July 27, 2021 16:06
mtreinish added a commit to mtreinish/qiskit-core that referenced this pull request Feb 3, 2022
In the recently merged Qiskit#7615 we bumped the black version and constrained
it to a stable version to keep us on a fixed set of formatting rules but
also receiving bug fixes. In doing this some new formatting rules were
applied to the repo (mainly `x ** y` was changed to `x**y`) by the new
version of black. To reduce noise in the git blame this commit updates
the .git-blame-ignore-revs file (which was added after we started using
black in Qiskit#6362) to include the sha1 for this commit. This means that
when running git blame on files this commit will be ignored (assuming
the local git environment is configured correctly).
mergify bot added a commit that referenced this pull request Feb 3, 2022
In the recently merged #7615 we bumped the black version and constrained
it to a stable version to keep us on a fixed set of formatting rules but
also receiving bug fixes. In doing this some new formatting rules were
applied to the repo (mainly `x ** y` was changed to `x**y`) by the new
version of black. To reduce noise in the git blame this commit updates
the .git-blame-ignore-revs file (which was added after we started using
black in #6362) to include the sha1 for this commit. This means that
when running git blame on files this commit will be ignored (assuming
the local git environment is configured correctly).

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT added a commit to ElePT/qiskit-algorithms that referenced this pull request Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants