Skip to content

Conversation

@dipree
Copy link
Contributor

@dipree dipree commented Jan 12, 2026

  • Fixed StageFiles() to resolve file paths relative to repo root before calling fileExists()
  • The bug caused files to be deleted when CWD ≠ repo root because:
    • fileExists() used os.Stat() which resolves relative to CWD
    • worktree.Remove() resolves relative to repo root
    • When these differed, existing files were incorrectly deleted

@dipree dipree requested a review from Soph January 12, 2026 17:51
@gtrrz-victor gtrrz-victor merged commit 5e798ea into main Jan 13, 2026
3 checks passed
@gtrrz-victor gtrrz-victor deleted the dipree/fix-accidental-file-deletion branch January 13, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants