# test\(server\): pin git config for fixtures and compare native realpaths · PR \#9570 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/9570)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: windows-tests/git-fixtures

Target branch: windows-tests/directory-fsync

Head commit: 11da79bf1749dd38c5d89072ca3db3b5a684400f

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/9570)

[Commits](https://git.cafe/pingdotgg/t3code/pull/9570/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/9570/diffs?format=markdown)

## Description

---

Git for Windows installs with core.autocrlf=true, so every repository the
suite creates checked committed LF files out as CRLF and byte-exact content
assertions in GitManager, CheckpointReactor, and the orchestration engine
integration test compared 'v2\r\n' against 'v2\n'. A vitest setup file
now pins autocrlf, filemode, longpaths, gpgsign, and the default branch
through GIT_CONFIG_* so every git child the driver spawns sees them, ahead
of whatever the host's ~/.gitconfig says.

Two tests compared an Effect realPath of os.tmpdir() against git's own
report of the same directory; on GitHub's Windows runners the temp dir is
spelled with its 8.3 short name (RUNNER~1) and only realpathSync.native
expands it. The newline-in-worktree-path test is skipped on Windows, where
NTFS rejects the name outright.

Part of the Windows test-suite stack rooted at [#9564](https://github.com/pingdotgg/t3code/pull/9564); the manual Windows lane comes from [#9538](https://github.com/pingdotgg/t3code/pull/9538).

Model: Claude Fable 5 in Claude Code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. -->
> [!NOTE]
> ### Pin Git config for test fixtures and switch path comparisons to native `realpath`
> - Adds [gitConfig.setup.ts](https://github.com/pingdotgg/t3code/pull/9570/files#diff-4b0cd6b441fcf19ae253655106a55d6e16c9a57683e608d1ae4487116ddba386) to inject fixed Git defaults (no autocrlf, no signing, no filemode, longpaths, `main` branch) into the test environment, and loads it via [vite.config.ts](https://github.com/pingdotgg/t3code/pull/9570/files#diff-0624f97be2b48ce1dcbd7427ae167f8521013f9f45650746dbaedce5f34458a2) before server tests run
> - Replaces Effect FileSystem `realpath` calls with Node's native `realpath` in `RepositoryIdentityResolver` and `GitVcsDriverCore` tests so path comparisons match platform behavior, including Windows short-name canonicalization
> - Skips the newline-path worktree listing test on `win32` because NTFS disallows newline characters in file names
> - Behavioral Change: Git subprocesses spawned by server tests now inherit the pinned config entries; path equality assertions use native realpath rather than Effect's implementation
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 11da79b.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- Macroscope's pull request summary ends here -->

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Test-only changes (Vitest setup, assertions, and one conditional skip); no production Git or VCS behavior is modified.
> 
> **Overview**
> Hardens the **server test suite on Windows and mixed host Git configs** without changing production code.
> 
> A new Vitest setup file injects fixed Git settings (`core.autocrlf=false`, no GPG signing, `init.defaultBranch=main`, etc.) through `GIT_CONFIG_*` so every `git` child process in tests ignores the developer’s `~/.gitconfig` and Git for Windows defaults that were breaking byte-exact content checks.
> 
> Path equality assertions in `RepositoryIdentityResolver` and `GitVcsDriverCore` tests now use **`NodeFS.realpathSync.native`** instead of Effect’s `realPath`, so comparisons match Git’s long paths when temp dirs appear as 8.3 short names on Windows runners. The worktree test that uses a newline in a path is **skipped on `win32`** because NTFS cannot create that name.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 11da79bf1749dd38c5d89072ca3db3b5a684400f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->


