Disable checkpoint if nested git repos are detected#4509
Merged
Conversation
mrubens
reviewed
Jun 10, 2025
|
|
||
| if (hasNestedGitRepos) { | ||
| throw new Error( | ||
| "Checkpoints are disabled because nested git repositories were detected in the workspace. " + |
Collaborator
There was a problem hiding this comment.
This is user-facing right? Should probably internationalize.
Collaborator
Author
There was a problem hiding this comment.
This is not currently user facing; it just shows up in the logs. I posed the question about surfacing this to users above; it sounds like you'd be supportive of that?
Collaborator
Author
There was a problem hiding this comment.
Will do this as a follow-up.
mrubens
approved these changes
Jun 10, 2025
Collaborator
mrubens
left a comment
There was a problem hiding this comment.
Looks good aside from the point on internationalization!
Member
|
It would be interesting if you can take a quick look at #4494 since it seems related to the nested git repos |
Collaborator
Author
Will take a look this week. |
lucasthahn
pushed a commit
to tne-ai/TNE-Code
that referenced
this pull request
Jun 10, 2025
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The logic to rename .git has always been a bit dodgy; this seems like a safer approach until we re-visit checkpoints.
I tested multi-root workspaces as well and found that VSCode will set the cwd to be the path of the first root in the workspace, so if we want to handle that case then some additional logic will be required (which is probably worth doing since the checkpoints will only apply to the first root in the workspace which will be confusing for people).
Open question: Should we display something in the UI if checkpoints are disabled due to one of the conditions that makes the checkpoint initialization throw?
Important
Disable checkpoints in
ShadowCheckpointServiceif nested git repositories are detected, and update related tests and logging.ShadowCheckpointService..gitdirectories.[Cline#...]to[Task#...]inpresentAssistantMessage.ts,index.ts, andgetEnvironmentDetails.ts.ShadowCheckpointService.test.tsto test for detection of nested git repositories instead of renaming logic..gitdirectories inexcludes.test.ts.This description was created by
for 4093faa. You can customize this summary. It will automatically update as commits are pushed.