Skip to content

Commit

Permalink
Restore git blame usefulness
Browse files Browse the repository at this point in the history
    - Added .git-blame-ignore-revs to the project
    - Exclude large formatting commits from git blame
  • Loading branch information
whabanks committed Jan 31, 2025
1 parent 0fb484b commit 5569cda
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/scripts/notify-dev-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ poetry completions zsh > ~/.zfunc/_poetry
# Install dependencies
poetry install

# Set up git blame to ignore certain revisions e.g. sweeping code formatting changes.
git config blame.ignoreRevsFile .git-blame-ignore-revs

# Install pre-commit hooks
git config --global --add safe.directory /workspaces/notification-utils
poetry run pre-commit install
11 changes: 11 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
##################################################################
## This file lists commits that should be ignored by git blame. ##
## e.g. Formatting commits, non-functional changes, etc. ##
##################################################################

# Black formatter https://github.com/cds-snc/notification-utils/commit/321dda7eb7ead83b32413f1b6425b78c757c2404
321dda7eb7ead83b32413f1b6425b78c757c2404
# Subsequent Black formatter changes https://github.com/cds-snc/notification-utils/commit/98dbf4c5234239e761375402a87a17ee07acc0d0
98dbf4c5234239e761375402a87a17ee07acc0d0
# Ruff formatter https://github.com/cds-snc/notification-utils/commit/56c2f9ff16038e1c6eb63979d5166e08110d3ec9
56c2f9ff16038e1c6eb63979d5166e08110d3ec9

0 comments on commit 5569cda

Please sign in to comment.