| … | … | @@ -246,28 +261,66 @@ const runGit = Effect.fn("runGit")(function* (rootDir: string, plan: ReferenceRe | |
| 302 | + | ||
| 303 | + | yield* Effect.gen(function* () { | |
| 304 | + | yield* fs.remove(path.join(checkout, ".git"), { recursive: true }); | |
| 305 | + | yield* fs.remove(target, { recursive: true, force: true }); | |
🔴 Critical scripts/sync-reference-repos.ts:305
sync:repos permanently deletes unstaged edits and untracked files under repo.prefix before checking for them; git add --all then also replaces any staged versions. Check the prefix for tracked and untracked changes and refuse to replace it, or preserve those changes before deletion.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @scripts/sync-reference-repos.ts around line 305: |
| 2 | |
| 3 | `sync:repos` permanently deletes unstaged edits and untracked files under `repo.prefix` before checking for them; `git add --all` then also replaces any staged versions. Check the prefix for tracked and untracked changes and refuse to replace it, or preserve those changes before deletion. |