Repository navigation
Fix missed same-size edits when capturing agent host Git snapshots - #339051
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused fix safely falls back on copy failure and is covered by a deterministic regression test.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes missed same-size working-tree edits when creating Agent Host Git snapshots.
Changes:
- Preserves index timestamps on temporary copies.
- Adds a deterministic racy-clean regression test.
- Verifies the real Git index remains unchanged.
| File | Description |
|---|---|
src/vs/platform/agentHost/node/agentHostGitService.ts |
Preserves timestamps when copying the Git index. |
src/vs/platform/agentHost/test/node/agentHostGitService.integrationTest.ts |
Tests same-size edit capture and index immutability. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Screenshot ChangesBase: Changed (2)1 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details. |
Vijay Upadya (vijayupadya)
marked this pull request as ready for review
October 1, 2026 06:31
Vijay Upadya (vijayupadya)
enabled auto-merge (squash)
October 1, 2026 06:31
Giuseppe Cianci (Giuspepe)
approved these changes
Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes an issue that caused the overlay integration test to fail intermittently on macOS.
Copying Git’s index on macOS/Linux gives it a newer modification timestamp, defeating Git’s racy-clean detection and potentially omitting same-size working-tree edits from snapshots.