cloudaxe-opencode/packages/opencode/src
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 refactor(account): destroy Account facade (#22068) 2026-04-11 14:16:36 -04:00
acp fix(core): implement proper configOptions for acp (#21134) 2026-04-05 21:29:34 -05:00
agent refactor(server): simplify router middleware with next() (#21720) 2026-04-11 16:55:17 -04:00
auth refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
bus refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
cli refactor(server): simplify router middleware with next() (#21720) 2026-04-11 16:55:17 -04:00
command refactor: collapse command facade (#21981) 2026-04-10 23:52:12 -04:00
config refactor(server): simplify router middleware with next() (#21720) 2026-04-11 16:55:17 -04:00
control-plane refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
effect refactor(file): destroy FileWatcher facade (#22091) 2026-04-11 21:19:12 -04:00
env
file refactor(file): destroy FileWatcher facade (#22091) 2026-04-11 21:19:12 -04:00
filesystem refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
flag feat(opencode): add OTLP observability support (#21387) 2026-04-07 17:02:55 -04:00
format refactor: collapse Format facade (#21980) 2026-04-10 23:18:54 -04:00
git refactor(git): remove runtime facade wrappers (#21982) 2026-04-10 23:52:48 -04:00
global
id
ide
installation refactor(installation): drop facade runtime wrappers (#21984) 2026-04-10 23:26:16 -04:00
lsp refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
mcp refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
npm fix(plugin): parse package specifiers with npm-package-arg and sanitize win32 cache paths (#21135) 2026-04-06 00:26:40 +00:00
patch
permission refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
plugin fix: ensure images read by agent dont count against quota (#22168) 2026-04-12 12:02:39 -05:00
project refactor(file): destroy FileWatcher facade (#22091) 2026-04-11 21:19:12 -04:00
provider chore: generate 2026-04-11 20:52:52 +00:00
pty refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
question refactor(question): destroy Question facade (#22092) 2026-04-11 20:57:01 -04:00
server refactor(question): destroy Question facade (#22092) 2026-04-11 20:57:01 -04:00
session fix: ensure images read by agent dont count against quota (#22168) 2026-04-12 12:02:39 -05:00
share refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
shell Remove CLI from electron app (#17803) 2026-04-09 13:18:46 +08:00
skill refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
snapshot fix(snapshot): respect gitignore for previously tracked files 2026-04-12 13:47:48 -04:00
storage refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
sync refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
tool refactor(tool): destroy Truncate facade, effectify Tool.define (#22093) 2026-04-11 21:20:12 -04:00
util chore: refactor log.ts, go back to glob but add sort (#22107) 2026-04-11 23:09:19 -05:00
v2 ignore: exploration 2026-04-12 13:14:46 -04:00
worktree refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
index.ts Revert "opencode: lazy-load top-level CLI commands" (#21726) 2026-04-09 20:03:48 +02:00
node.ts Remove CLI from electron app (#17803) 2026-04-09 13:18:46 +08:00
sql.d.ts