Skip to content

Commit 53d02e9

Browse files
claude[bot]claude
andauthored
chore: .gitignore covers a symlinked node_modules, not only the directory form (#15763) (#15821)
`.gitignore:2` is `node_modules/` — the trailing slash makes it match a DIRECTORY only. In a linked worktree whose `node_modules` is a symlink to a shared install, the rule does not match: `git check-ignore -v node_modules` exits 1 and `git status --short` prints `?? node_modules`. Add the slashless form beside it (the existing line is untouched). This repo tracks `node_modules` in no shape, so covering both forms costs nothing, and it closes the `git add -A` hazard recorded twice before (#10781, #12583): an untracked, non-ignored path at the repo root is one careless `git add -A` away from committing a symlink to an absolute container path. Measured effect it also removes: `dispatch-gates.mjs --changed` counts that untracked path as part of the change set, and even derives a gate family from it via `node_modules/@objectstack/spec/CHANGELOG.md`. Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk Co-authored-by: Claude <noreply@anthropic.com>
1 parent ec0a6e7 commit 53d02e9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Dependencies
22
node_modules/
3+
# also without the slash: in a linked worktree node_modules can be a symlink, which is not a directory to git and so escapes the line above; the repo tracks node_modules in no shape (#15763)
4+
node_modules
35
package-lock.json
46

57
# Build output

0 commit comments

Comments
 (0)