From 5bde3695936a6b0c0df02afc639d45fb23e75e74 Mon Sep 17 00:00:00 2001 From: Jim Schreckengast Date: Wed, 11 Nov 2026 08:14:23 -0700 Subject: [PATCH] Skip the rustfmt reformat in git blame List the formatting commit from #17 in .git-blame-ignore-revs, which GitHub's blame view reads, and say in CONTRIBUTING.md how to make git blame skip it locally. Signed-off-by: Jim Schreckengast --- .git-blame-ignore-revs | 6 ++++++ CONTRIBUTING.md | 3 +++ 2 files changed, 9 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 0000000..938949b --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,6 @@ +# Commits that only reformat code, which `git blame` can skip. GitHub's blame view reads +# this file automatically; to use it locally, run +# `git config blame.ignoreRevsFile .git-blame-ignore-revs` once in your clone. + +# Format the code with rustfmt (#17) +68a23f1d4cdc5b90c81ff751f1c70bfb854b39fd diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9155cf6..62fba16 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,6 +43,9 @@ rustup target add wasm32-unknown-unknown trunk serve --release --open ``` +To make `git blame` skip commits that only reformat code, as GitHub's blame view does, +run `git config blame.ignoreRevsFile .git-blame-ignore-revs` once in your clone. + ## Checks your change must pass CI runs these on every pull request. Running them locally first saves a round trip: