mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-19 18:42:09 +00:00
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.