Skip to content

Commit 013ccfc

Browse files
donjor-agent[bot]donjor
authored andcommitted
test(server): pin core.excludesFile in the GitManager fixture (#1874)
## Problem `GitManager.test.ts` fails locally when the host's global gitignore lists `CLAUDE.md` or `AGENTS.md`. The fixture's first commit stages nothing, so `commitInstructions[0]` holds the second call and the case `includes CLAUDE.md for Claude writers only when it differs from AGENTS.md` fails. CI passes: its runner has no global ignore. ## Change `initRepo` pins `core.excludesFile` to an empty path, beside `core.hooksPath`. Fixture only; no production change. ```diff yield* runGit(cwd, ["config", "core.hooksPath", ".git/hooks"]); + yield* runGit(cwd, ["config", "core.excludesFile", ""]); ``` An empty path disables the global ignore without a platform-specific `/dev/null`. ## Scope and approval Closes #1870 ## Verification - [x] Before: case fails with real `HOME` (`core.excludesFile=~/.gitignore-global`) - [x] After: `vp test run src/git/GitManager.test.ts` with real `HOME`: 104 passed - [x] After: case passes with `HOME=$(mktemp -d)` - [x] `vp run check:changed` → exit 0 - [x] `vp run fork:ci` → exit 0 - [ ] Windows not run locally; CI covers it Claude Opus 5.5 via Claude Code in T3 Code. ## Fork trailers Fork-Domain: upstream-fixes Fork-Tier: bugfix Fork-Upstreamable: yes Co-authored-by: donjor <[email protected]>
1 parent 19b9067 commit 013ccfc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎apps/server/src/git/GitManager.test.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ function initRepo(
214214
// Override global autocrlf on Windows for LF assertions, including linked worktrees.
215215
yield* runGit(cwd, ["config", "core.autocrlf", "false"]);
216216
yield* runGit(cwd, ["config", "core.hooksPath", ".git/hooks"]);
217+
// A global ignore listing AGENTS.md or CLAUDE.md would silently drop the
218+
// fixture's instruction files; an empty path disables it on every platform.
219+
yield* runGit(cwd, ["config", "core.excludesFile", ""]);
217220
yield* fs.writeFileString(NodePath.join(cwd, "README.md"), "hello\n");
218221
yield* runGit(cwd, ["add", "README.md"]);
219222
yield* runGit(cwd, ["commit", "-m", "Initial commit"]);

0 commit comments

Comments
 (0)