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

Use .git-blame-ignore-revs #2683

Merged
merged 1 commit into from
Aug 26, 2020
Merged

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Aug 25, 2020

This new file contains the hashes of commits whose only function was
to reformat large amounts of code.

Ordinarily, this would make for confusing 'git blame' output, by
making old code written by author A appear to have a new modification
date and authorship by B, when in fact we know that B just did some
reformatting. This can make it especially hard to discern code history
after after commits that establish the use of "clang-format".

A new git feature (requiring git >= 2.23) allows pointing to a file
containing hashes of commits to be ignored by git blame:

git blame --ignore-revs-file .git-blame-ignore-revs

To avoid having to remember this all the time, consider adding this to
your git config:

git config blame.ignoreRevsFile .git-blame-ignore-revs

Note that git supports this feature but does not dictate the name of
the file. I'm just following the convention I'm seeing pop up in other
projects of calling it ".git-blame-ignore-revs".

Signed-off-by: Larry Gritz lg@larrygritz.com

This new file contains the hashes of commits whose only function was
to reformat large amounts of code.

Ordinarily, this would make for confusing 'git blame' output, by
making old code written by author A appear to have a new modification
date and authorship by B, when in fact we know that B just did some
reformatting. This can make it especially hard to discern code history
after after commits that establish the use of "clang-format".

A new git feature (requiring git >= 2.23) allows pointing to a file
containing hashes of commits to be ignored by git blame:

    git blame --ignore-revs-file .git-blame-ignore-revs

To avoid having to remember this all the time, consider adding this to
your git config:

    git config blame.ignoreRevsFile .git-blame-ignore-revs

Note that git supports this feature but does not dictate the name of
the file. I'm just following the convention I'm seeing pop up in other
projects of calling it ".git-blame-ignore-revs".

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz lgritz merged commit f403a56 into AcademySoftwareFoundation:master Aug 26, 2020
@lgritz lgritz deleted the lg-blame branch August 26, 2020 06:13
lgritz added a commit that referenced this pull request Aug 26, 2020
This new file contains the hashes of commits whose only function was
to reformat large amounts of code.

Ordinarily, this would make for confusing 'git blame' output, by
making old code written by author A appear to have a new modification
date and authorship by B, when in fact we know that B just did some
reformatting. This can make it especially hard to discern code history
after after commits that establish the use of "clang-format".

A new git feature (requiring git >= 2.23) allows pointing to a file
containing hashes of commits to be ignored by git blame:

    git blame --ignore-revs-file .git-blame-ignore-revs

To avoid having to remember this all the time, consider adding this to
your git config:

    git config blame.ignoreRevsFile .git-blame-ignore-revs

Note that git supports this feature but does not dictate the name of
the file. I'm just following the convention I'm seeing pop up in other
projects of calling it ".git-blame-ignore-revs".

Signed-off-by: Larry Gritz <lg@larrygritz.com>
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.

None yet

1 participant