Skip to content

chore: Add .git-blame-ignore-revs to ignore style in blame view#2687

Open
matthewfeickert wants to merge 1 commit intoscikit-hep:mainfrom
matthewfeickert:chore/add-git-blame-ignore-revs
Open

chore: Add .git-blame-ignore-revs to ignore style in blame view#2687
matthewfeickert wants to merge 1 commit intoscikit-hep:mainfrom
matthewfeickert:chore/add-git-blame-ignore-revs

Conversation

@matthewfeickert
Copy link
Copy Markdown
Member

@matthewfeickert matthewfeickert commented Apr 2, 2026

Description

Follow up to PR #2686 and #2688

  • Add a git blame ignore-revs file to automatically ignore commits listed in it from the blame view on GitHub. Include in it style changes added by pre-commit hooks which touch multiple files.

To ignore the commits in the .git-blame-ignore-revs when running git blame locally run: git blame --ignore-revs-file .git-blame-ignore-revs.

c.f.:

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* Add a git blame ignore-revs file to automatically ignore commits listed
in it from the blame view on GitHub. Include in it style changes added by
pre-commit hooks which touch multiple files.

To ignore the commits in the .git-blame-ignore-revs when running `git blame`
locally run: `git blame --ignore-revs-file .git-blame-ignore-revs`.

c.f.:
- https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt
- https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view

* Ignore 'style: Move formatting from Black to Ruff' (PR 2686).
* Ignore 'style: Add extended Ruff rules from Scientific Python repo review' (PR 2688).

@matthewfeickert matthewfeickert self-assigned this Apr 2, 2026
@matthewfeickert matthewfeickert added the chore Other changes that don't modify src or test files label Apr 2, 2026
@matthewfeickert matthewfeickert marked this pull request as ready for review April 2, 2026 19:03
@@ -0,0 +1,2 @@
# style: Move formatting from Black to Ruff
dc3a6cfdb66036e318b2317fde0e4ef17f135925
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As a double check, dc3a6cfdb66036e318b2317fde0e4ef17f135925 is dc3a6cf

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a repository-level .git-blame-ignore-revs file so GitHub’s blame view (and local git blame when configured) can ignore large, non-functional formatting commits, keeping blame history more useful.

Changes:

  • Add .git-blame-ignore-revs to list formatting-only commit(s) to be ignored by blame.
  • Include the commit hash for the “Move formatting from Black to Ruff” change set (PR #2686).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.18%. Comparing base (ebf841e) to head (6529e94).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2687   +/-   ##
=======================================
  Coverage   98.18%   98.18%           
=======================================
  Files          65       65           
  Lines        4289     4289           
  Branches      461      461           
=======================================
  Hits         4211     4211           
  Misses         48       48           
  Partials       30       30           
Flag Coverage Δ
contrib 98.06% <ø> (ø)
doctest 98.18% <ø> (ø)
unittests-3.10 96.36% <ø> (ø)
unittests-3.11 96.36% <ø> (ø)
unittests-3.12 96.36% <ø> (ø)
unittests-3.13 96.36% <ø> (ø)
unittests-3.9 96.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kratsg
Copy link
Copy Markdown
Contributor

kratsg commented Apr 2, 2026

The ruff styles aren't fully implemented. Give me a chance to put in another PR that covers the additional ones recommended from scientific-python.

@matthewfeickert matthewfeickert marked this pull request as draft April 3, 2026 17:58
@matthewfeickert
Copy link
Copy Markdown
Member Author

Requires PR #2688 to go in first.

* Add a git blame ignore-revs file to automatically ignore commits listed
in it from the blame view on GitHub. Include in it style changes added by
pre-commit hooks which touch multiple files.

To ignore the commits in the .git-blame-ignore-revs when running `git blame`
locally run: `git blame --ignore-revs-file .git-blame-ignore-revs`.

c.f.:
- https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt
- https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view

* Ignore 'style: Move formatting from Black to Ruff' (PR 2686).
* Ignore 'style: Add extended Ruff rules from Scientific Python repo review' (PR 2688).
@matthewfeickert matthewfeickert force-pushed the chore/add-git-blame-ignore-revs branch from 06b51ae to 6529e94 Compare April 3, 2026 23:25
@matthewfeickert matthewfeickert marked this pull request as ready for review April 3, 2026 23:25
dc3a6cfdb66036e318b2317fde0e4ef17f135925

# style: Add extended Ruff rules from Scientific Python repo review
ebf841e656a9eb9a6114f95971d890be1bde8c3e
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ebf841e656a9eb9a6114f95971d890be1bde8c3e is ebf841e

@matthewfeickert
Copy link
Copy Markdown
Member Author

@kratsg While I'll review the other PRs tonight we can get this one in to make diffing some things easier moving forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Other changes that don't modify src or test files

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants