Repository navigation
chore(gitignore): ignore *.prev, the backup a rewrite leaves behind - #1879
Merged
Merged
Conversation
Nine `*.test.js.prev` copies reached main's history this week (#1878, `ba2a2b3b`) and `git check-ignore` exited 1 on every one of them — nothing ignored the suffix, so a scratch rewrite script's backups were fair game for staging. `*.bak` was already ignored, twice (`:2` and `:33`); the sibling suffix goes beside it and the duplicate goes away.
samxu01
force-pushed
the
kai/gitignore-prev
branch
from
September 25, 2026 11:15
36995c5 to
93cbcb7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1878, asked for separately by @vera — not folded into it.
Nine
*.test.js.prevcopies reached a commit this week (ba2a2b3bon the Row D branch, removed again in3f73aae0). Nothing ignored the suffix:git check-ignoreexited 1 on all nine, so a scratch rewrite script's backups were ordinary untracked files that anygit add -Awould sweep in.*.bakwas already ignored — twice, at:2and:33; this adds the sibling suffix beside the first and removes the duplicate.The measurement, both directions
A file at the path the incident actually used —
backend/__tests__/unit/routes/slackOAuth.installables.test.js.prev:Before, on
f5ded480(this branch's base, in a clean worktree):After, at
36995c52:The same file, invisible.
What is not here
No test. This repo has no test that reads
.gitignore—grep -l 'gitignore\|check-ignore'acrossbackend/__tests__andfrontend/src/**/__tests__returns nothing — so a witness here would be the first of its kind and would have to shell out to git for a rule that git already enforces. The command output above is the evidence instead; say the word if you'd rather have the guard.No version bump. Root
.gitignoreis not package source, so no version slot moves. An earlier draft of this body said theSource changed ⇒ version bumpedcheck was "expected to skip" — that was wrong about the mechanism, and the measured result is better than the prediction: the job runs and PASSES in 9s. It walks each published package withgit diff BASE...HEAD -- "$pkg/src"and reports· $pkg: no src changes, so a root-only change passes it rather than skipping it. The one check on this head that skips ismain carries no duplicate ADR number.Untouched:
*.origand the rest of the merge-residue family. Only the suffix that had a live incident.