From e175828091d12cb0ecdb2615674a7888fcdcdcf4 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 17 Aug 2023 14:57:22 -0400 Subject: [PATCH] STYLE: Improve attribution by ignoring bulk formatting 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 Co-authored-by: Hans Johnson --- .git-blame-ignore-revs | 17 +++++++++++++++++ scripts/check_filenames.sh | 1 + 2 files changed, 18 insertions(+) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000..6192ec4d3 --- /dev/null +++ b/.git-blame-ignore-revs @@ -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 diff --git a/scripts/check_filenames.sh b/scripts/check_filenames.sh index 69833251b..4169a0fdf 100755 --- a/scripts/check_filenames.sh +++ b/scripts/check_filenames.sh @@ -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)