-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(checkpoints): allow checkpoints in workspaces with nested git repositories #11360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Re-reviewed since d4b7e1c. The previously flagged unused import has been removed, and no new issues found. The detect-and-exclude approach with defense-in-depth layering (exclude file, pathspec excludes, gitlink purge, conservative filesystem fallback) looks solid.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| import { fileExistsAtPath } from "../../utils/fs" | ||
| import { arePathsEqual } from "../../utils/path" | ||
| import { executeRipgrep } from "../../services/search/file-search" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arePathsEqual is imported here but never used anywhere in the file. This is dead code introduced by this PR.
| import { fileExistsAtPath } from "../../utils/fs" | |
| import { arePathsEqual } from "../../utils/path" | |
| import { executeRipgrep } from "../../services/search/file-search" | |
| import { fileExistsAtPath } from "../../utils/fs" | |
| import { executeRipgrep } from "../../services/search/file-search" |
Fix it with Roo Code or mention @roomote and request a fix.
…points Replace the kill switch that disabled checkpoints entirely when nested git repositories were detected. Instead, detect nested repos at init time (via ripgrep dual scan for .git/HEAD and .git pointer files), exclude them from shadow git tracking, and warn the user. Safety enforcement is defense-in-depth: - Anchored exclude patterns in .git/info/exclude - Pathspec excludes in git add - Post-staging gitlink purge with triggered re-detection - Conservative filesystem-based fallback when detection fails - Filtered git add error handling (only suppresses "ignored paths")
51d2e3c to
d4b7e1c
Compare
Closes #10636
Closes #11340
Summary
.git/HEADand.gitpointer files (dual ripgrep scan, no--follow).git/info/exclude(anchored patterns) and staging pathspec excludesnested_git_repos_excludedacross all 18 locales (localized translations)Scope note: This PR intentionally does not change
core.worktreecomparison canonicalization. That concern is addressed separately in #11346 (worktree path normalization for Windows). The two PRs are orthogonal — merge order is flexible and there are no code conflicts between them.Test plan
.gitpointer files detected