Skip to content

chore: record the Prettier reformat in .git-blame-ignore-revs - #198

Merged
qiuethan merged 1 commit into
stagingfrom
chore/blame-ignore-sha
Aug 9, 2026
Merged

chore: record the Prettier reformat in .git-blame-ignore-revs#198
qiuethan merged 1 commit into
stagingfrom
chore/blame-ignore-sha

Conversation

@qiuethan

@qiuethan qiuethan commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

What this changes

Appends the real squash SHA to .git-blame-ignore-revs.

Why it's a separate PR

#192 couldn't carry its own SHA. This repo squash-merges, so the commit didn't exist until it landed on staging — any SHA committed on the branch would have silently matched nothing. #192 shipped the file with a TODO; this closes it. The SHA is c970bc9.

Measured effect

Lines git blame credited to the formatter, before → after, on the worst-hit files:

File Before After
src/commands/team.js 55 of 188 1
src/adapters/discord.js 40 of 591 0
src/commands/doc.js 30 of 128 1
src/web/public/app.js 23 of 304 0
src/meeting/meetingSurface.js 22 of 259 0

Nearly a third of team.js was blaming a formatting pass. Now it points at whoever wrote the line — which is the whole reason to keep history readable in a repo where the author has usually graduated.

How to verify

git blame discord-bot/src/commands/team.js | grep -c "gate JS"                       # 55
git blame --ignore-revs-file .git-blame-ignore-revs discord-bot/src/commands/team.js | grep -c "gate JS"   # 1

GitHub applies the file automatically in its blame view. Locally it's opt-in once per clone:

git config blame.ignoreRevsFile .git-blame-ignore-revs

Zone

root.

🤖 Generated with Claude Code

Follow-up to #192, which could not carry its own SHA: this repo squash-merges,
so the commit did not exist until it landed on staging. It is c970bc9.

Measured effect on the worst-hit files -- lines git blame credited to the
formatter, before -> after:

  src/commands/team.js          55 of 188  ->  1
  src/adapters/discord.js       40 of 591  ->  0
  src/commands/doc.js           30 of 128  ->  1
  src/web/public/app.js         23 of 304  ->  0
  src/meeting/meetingSurface.js 22 of 259  ->  0

Nearly a third of team.js blamed on a formatting pass. Now it points at whoever
wrote the line.

GitHub applies this automatically in its blame view. Locally it is opt-in once
per clone:

    git config blame.ignoreRevsFile .git-blame-ignore-revs
@qiuethan
qiuethan merged commit 2869b52 into staging Aug 9, 2026
13 checks passed
@qiuethan
qiuethan deleted the chore/blame-ignore-sha branch August 9, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant