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

MAINT: Ignore black format changes #713

Merged
merged 2 commits into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# When making commits that are strictly formatting/style changes, add the
# commit hash here, so git blame can ignore the change.
#
# For more details, see:
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile
# https://github.com/pydata/pydata-sphinx-theme/pull/713
#
90550b66ace16a370caa446e54698b126fda740b # initial black-format
236d4c6d1f10f5da064d929e9eb594daecf23551 # apply black 20.8b1 format
8 changes: 8 additions & 0 deletions docs/contribute/topics.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,11 @@ To update or add a JS dependency, follow these steps:
```

3. **Commit both files** to the repository. When new people pull in the latest commits, their `npm` environment will automatically update according to the new lockfile.

## Ignore format commits with `git blame`

When making commits that are strictly formatting/style changes (e.g., after running a new version of black or running pyupgrade after dropping an old Python version), add the commit hash to `.git-blame-ignore-revs`, so git blame can ignore the change.

For more details, see:
https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile
https://github.com/pydata/pydata-sphinx-theme/pull/713