cloudaxe-opencode/packages/opencode/test
Dax Raad 6f88ab8f8d fix(snapshot): respect gitignore for previously tracked files
Files previously tracked in the snapshot that were later added to .gitignore
were still being included in patches. This happened because:

1. diff-files returns tracked files regardless of gitignore status
2. git add was re-adding all files including those now ignored
3. patch() and diffFull() output wasn't filtering out gitignored files

The fix:
- In add(): Use git check-ignore --no-index to identify newly-ignored files
  (even if they're tracked in source git) and remove them from the snapshot
  index with git rm --cached
- In patch(): Filter out gitignored files from the diff output using
  git check-ignore --no-index
- In diffFull(): Filter out gitignored files from the diff output

Tests added:
1. files tracked in snapshot but now gitignored are filtered out
   Uses a.txt (from bootstrap) to test files already in git

2. gitignore updated between track calls filters from diff
   Tests that gitignore changes between two track() calls
   properly filter from diffFull results

Fixes issue where files like .android-sdk were re-added to snapshots
even after being added to .gitignore.
2026-04-12 13:47:48 -04:00
..
account chore: generate 2026-04-07 18:33:24 +00:00
acp feat(acp): Add messageID and emit user_message_chunk on prompt/command (#18625) 2026-04-02 12:56:56 -05:00
agent chore: remove dead code for todoread tool (#19128) 2026-03-25 16:21:42 +00:00
auth fix(auth): normalize trailing slashes in auth login URLs (#15874) 2026-03-03 13:35:49 -05:00
bus test: migrate prompt tests to HTTP mock LLM server (#20304) 2026-03-31 19:14:32 -04:00
cli rector(core,tui): handle workspace state in project context, add workspace status, improve ui (#21896) 2026-04-10 13:03:20 -04:00
config fix(tui): default Ctrl+Z to undo on Windows (#21138) 2026-04-06 02:38:35 +00:00
control-plane feat(core): remove workspace server, WorkspaceContext, start work towards better routing (#19316) 2026-03-26 12:30:26 -04:00
effect refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
fake refactor(prompt): use Provider service in effect layers (#20167) 2026-04-01 00:44:15 +00:00
file refactor(file): destroy FileTime facade (#22090) 2026-04-11 20:08:55 -04:00
filesystem feat(filesystem): add AppFileSystem service, migrate Snapshot (#18138) 2026-03-18 19:52:43 -04:00
fixture refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
format tweak: make it so disabling uv or ruff fmters disables both (#21921) 2026-04-10 13:30:30 -05:00
git feat: restore git-backed review modes (#20845) 2026-04-03 09:54:57 -05:00
ide fix(test): replace structuredClone with spread for process.env (#14908) 2026-02-24 23:16:24 +10:00
installation refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
lib refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
lsp fix: ts lsp (#21827) 2026-04-10 00:15:45 -05:00
mcp feat(mcp): add OAuth redirect URI configuration for MCP servers (#21385) 2026-04-09 11:45:52 -05:00
memory refactor(server): simplify router middleware with next() (#21720) 2026-04-11 16:55:17 -04:00
patch big format 2025-11-06 13:03:12 -05:00
permission Move service state into InstanceState, flatten service facades (#18483) 2026-03-21 04:51:35 +00:00
plugin feat: make gh copilot use msgs api when available (#22106) 2026-04-11 23:06:35 -05:00
project refactor(file): destroy FileWatcher facade (#22091) 2026-04-11 21:19:12 -04:00
provider fix: enable thinking for zhipuai-coding-plan & prevent Korean IME truncation (#22041) 2026-04-11 15:51:49 -05:00
pty feat(windows): add first-class pwsh/powershell support (#16069) 2026-03-30 13:10:01 +10:00
question chore: generate 2026-04-12 00:58:05 +00:00
server refactor(session): destroy SessionRunState facade (#22064) 2026-04-11 20:01:52 -04:00
session refactor(session): destroy Instruction facade (#22089) 2026-04-11 20:04:09 -04:00
share refactor: destroy Storage facades (#21956) 2026-04-10 21:21:02 -04:00
shell feat(windows): add first-class pwsh/powershell support (#16069) 2026-03-30 13:10:01 +10:00
skill Move service state into InstanceState, flatten service facades (#18483) 2026-03-21 04:51:35 +00:00
snapshot fix(snapshot): respect gitignore for previously tracked files 2026-04-12 13:47:48 -04:00
storage chore: generate 2026-04-11 01:22:01 +00:00
sync effectify Bus service: migrate to Effect PubSub + InstanceState (#18579) 2026-03-25 20:19:24 -04:00
tool chore: generate 2026-04-12 01:21:17 +00:00
util fix: ensure logger cleanup properly orders list before deleting files (#22101) 2026-04-11 22:07:34 -05:00
AGENTS.md refactor(file): destroy FileTime facade (#22090) 2026-04-11 20:08:55 -04:00
keybind.test.ts fix super modifier parsing 2025-12-11 19:20:23 +01:00
npm.test.ts fix(plugin): parse package specifiers with npm-package-arg and sanitize win32 cache paths (#21135) 2026-04-06 00:26:40 +00:00
permission-task.test.ts Move service state into InstanceState, flatten service facades (#18483) 2026-03-21 04:51:35 +00:00
preload.ts feat(core): initial implementation of syncing (#17814) 2026-03-25 10:47:40 -04:00