Commit abfd4d0
fix(status): use git add --renormalize so -f actually re-encrypts
Root cause of the intermittent Windows failure, confirmed by evidence
from a 30x stress run: git add skipped the file entirely.
index entry: 100644 dfbd3cbb... bad.secret
HEAD blob: dfbd3cbb... <- identical
index bytes: "should-be-" <- plaintext
check-attr: filter: git-crypt <- attribute in effect
filter.git-crypt.clean: configured
The filter was configured and the attribute applied, yet git add exited 0
having done nothing. Only .gitattributes had changed; the working file was
byte-identical to what was committed, so git's stat cache said there was
no work and the clean filter was never invoked. It surfaced only
intermittently because git re-hashes 'racily clean' files (mtime not
strictly older than the index) as a safeguard, which usually masked it.
This was never merely a flaky test. status -f would report 're-staged N of
M file(s)' while leaving the plaintext secret staged — a false assurance
about the exact thing the command exists to fix.
--renormalize re-applies the clean process to tracked files
unconditionally. It does not stage untracked files, so -f still refuses to
auto-add them.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TYMP8eH52L6rNdjbukfuyZ1 parent e68f1a5 commit abfd4d0
2 files changed
Lines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
175 | 186 | | |
176 | | - | |
| 187 | + | |
177 | 188 | | |
178 | 189 | | |
179 | 190 | | |
| |||
0 commit comments