From 0d29159e6d8a731ae44e9ce0dfeb4d76ae05c81d 2020-01-21 05:10:12 From: Terry Davis <16829776+terrdavis@users.noreply.github.com> Date: 2020-01-21 05:10:12 Subject: [PATCH] Adds support for blame ignore. Windows and non-Windows scripts are provided for initial setup. Commit hashes to ignore are entered in the file .git-blame-ignore-revs --- diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..70971c5 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,8 @@ +# When making commits that are strictly formatting/style changes, add the +# commit hash here, so git blame can ignore the change. +# See docs for more details: +# https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile + +# Example entries: +# # initial black-format +# # rename something internal diff --git a/tools/configure-git-blame-ignore-revs.bat b/tools/configure-git-blame-ignore-revs.bat new file mode 100644 index 0000000..3fc3c01 --- /dev/null +++ b/tools/configure-git-blame-ignore-revs.bat @@ -0,0 +1,10 @@ +rem Other config options for blame are markUnblamables and markIgnoredLines. +rem See docs for more details: +rem https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile + +rem Uncomment below and rerun script to enable an option. +rem git config blame.markIgnoredLines +rem git config blame.markUnblamables + +git config blame.ignoreRevsFile .git-blame-ignore-revs +git config --get blame.ignoreRevsFile diff --git a/tools/configure-git-blame-ignore-revs.sh b/tools/configure-git-blame-ignore-revs.sh new file mode 100644 index 0000000..e1892ef --- /dev/null +++ b/tools/configure-git-blame-ignore-revs.sh @@ -0,0 +1,10 @@ +# Other config options for blame are markUnblamables and markIgnoredLines. +# See docs for more details: +# https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile + +# Uncomment below and rerun script to enable an option. +# git config blame.markIgnoredLines +# git config blame.markUnblamables + +git config blame.ignoreRevsFile .git-blame-ignore-revs +git config --get blame.ignoreRevsFile