bulatb
Joined 14 years ago
Karma
1,129
Submissions
729
Member since
May 28
I'm easy to find. <my first name>@<my last name>.com
View on Hacker NewsJoined 14 years ago
You could do that to an internet-connected toaster with a JPEG. The system() function has nothing to do with it.
git commit -m "Autoformat source files"
git log --format="# %s%n%H" -1 >> .git-blame-ignore-revs
git add .git-blame-ignore-revs
git commit -m "Ignore autoformat commit in blames"
cat .git-blame-ignore-revs
# Autoformat source files
0a1b2c3d...
git blame --ignore-revs-file .git-blame-ignore-revs code.src
Git can use it automatically too: git config blame.ignoreRevsFile .git-blame-ignore-revs
git blame code.src
Though git-blame may fail or crash if blame.ignoreRevsFile is set but the file is missing (hence "config", not "config --global"). Since version 2.53, a configured ignoreRevsFile can be missing if the value starts with ":(optional)".