Skip to content

fix(snapshot): let git drop ignored snapshot paths#22568

Open
thdxr wants to merge 2 commits intodevfrom
fix/snapshot-gitignored-index
Open

fix(snapshot): let git drop ignored snapshot paths#22568
thdxr wants to merge 2 commits intodevfrom
fix/snapshot-gitignored-index

Conversation

@thdxr
Copy link
Copy Markdown
Member

@thdxr thdxr commented Apr 15, 2026

Summary

  • simplify snapshot staging to rely on git's index queries instead of manual ignore parsing
  • restore tracked paths that are now ignored back to the previous snapshot tree using --pathspec-from-file=- and --pathspec-file-nul so large ignored sets do not overflow argv on Windows
  • remove redundant ignore filtering from patch() and diffFull() now that add() keeps the snapshot index clean

Testing

  • bun test test/snapshot/snapshot.test.ts
  • bun typecheck
  • bun test (currently fails in test/session/session.test.ts: session.created event should be emitted before session.updated)

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@thdxr thdxr force-pushed the fix/snapshot-gitignored-index branch from e024ca5 to 2a0db59 Compare April 15, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant