cloudaxe-opencode/packages/opencode
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
..
bin cache platform binary in postinstall for faster startup (#14467) 2026-02-20 12:19:17 -06:00
migration chore: generate 2026-03-25 14:48:44 +00:00
script app: remove min loading duration (#21655) 2026-04-09 16:29:46 +08:00
specs chore: generate 2026-04-12 00:03:01 +00:00
src fix(snapshot): respect gitignore for previously tracked files 2026-04-12 13:47:48 -04:00
test fix(snapshot): respect gitignore for previously tracked files 2026-04-12 13:47:48 -04:00
.gitignore fix(opencode): ignore generated models snapshot files (#19362) 2026-03-27 02:21:17 +00:00
AGENTS.md effectify Config service (#19139) 2026-03-26 13:07:01 -04:00
BUN_SHELL_MIGRATION_PLAN.md sync 2026-02-25 01:48:10 -05:00
bunfig.toml tui plugins (#19347) 2026-03-27 15:00:26 +01:00
Dockerfile
drizzle.config.ts sqlite again (#10597) 2026-02-14 04:19:02 +00:00
git feat: interactive update flow for non-patch releases (#18662) 2026-03-22 23:12:40 +00:00
package.json refactor(server): simplify router middleware with next() (#21720) 2026-04-11 16:55:17 -04:00
parsers-config.ts feat(tui): add syntax highlighting for kotlin, hcl, lua, toml (#18198) 2026-03-23 16:15:24 +01:00
README.md
sst-env.d.ts zen: update sst version 2026-02-18 13:54:23 -05:00
tsconfig.json chore: generate 2026-03-10 16:56:30 +00:00

js

To install dependencies:

bun install

To run:

bun run index.ts

This project was created using bun init in bun v1.2.12. Bun is a fast all-in-one JavaScript runtime.