Skip to content

Commit

Permalink
STYLE: Improve attribution by ignoring bulk formatting
Browse files Browse the repository at this point in the history
This file lists revisions that should be ignored when considering
attribution for the actual code written. Code style changes should
not be considered as modifications with regards to attribution.

To see clean and meaningful blame information.
$ git blame important.py --ignore-revs-file .git-blame-ignore-revs

To configure git to automatically ignore revisions listed in a file on every call to git blame.
$ git config blame.ignoreRevsFile .git-blame-ignore-revs

Based on InsightSoftwareConsortium/ITK@3a969e5
and Slicer/Slicer@ec82a93.

Co-authored-by: James Butler <[email protected]>
Co-authored-by: Hans Johnson <[email protected]>
  • Loading branch information
3 people committed Aug 17, 2023
1 parent 2f0df9c commit e175828
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# This file lists revisions that should be ignored when considering
# attribution for the actual code written. Code style changes should
# not be considered as modifications with regards to attribution.
#
# To see clean and meaningful blame information.
# $ git blame important.py --ignore-revs-file .git-blame-ignore-revs
#
# To configure git to automatically ignore revisions listed in a file on every call to git blame.
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs
#
# Ignore changes introduced when doing global file format changes
#
# STYLE: Convert files from CRLF to LF
e73a05a60a181bde5d2ebd2fe811ac413a7ee734
# STYLE: Remove trailing whitespaces
87fdbddba738f033add2882feebd50d3c43fa48a
1 change: 1 addition & 0 deletions scripts/check_filenames.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ unexpected_files=$(find . -mindepth 1 \( -type d \( \
-path ./scripts \
\) -o -type f \( \
-name .pre-commit-config.yaml -o \
-name .git-blame-ignore-revs -o \
-name README.md -o \
-name "*.s4ext" \
\) \) -prune -o -print)
Expand Down

0 comments on commit e175828

Please sign in to comment.