Commit b744daa
Fix pre-commit hook to not stage unrelated working directory changes
The update-links section was using `git diff --name-only` which captures
ALL modified files in the working directory, not just files modified by
the update-links script. This could accidentally stage files the user
had modified but intentionally not staged for the current commit.
Fix: Capture the list of already-modified files BEFORE running update-links,
then only stage files that weren't already modified (i.e., files that became
modified as a result of update-links).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent da0ae54 commit b744daa
1 file changed
+21
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
73 | 89 | | |
74 | 90 | | |
75 | 91 | | |
| |||
0 commit comments