Skip to content

fix: make worktree checkout atomic during sparse checkout failures - #7

Open
wasim-builds wants to merge 1 commit into
jaasielitaigq:mainfrom
wasim-builds:fix/atomic-checkout
Open

fix: make worktree checkout atomic during sparse checkout failures#7
wasim-builds wants to merge 1 commit into
jaasielitaigq:mainfrom
wasim-builds:fix/atomic-checkout

Conversation

@wasim-builds

Copy link
Copy Markdown

Fixes #1 by introducing a rollback mechanism for Worktree.Checkout. If the sparse checkout operation fails, a defer block restores the initial index state and cleans up untracked or partially written files, preventing the repository from entering an inconsistent state.

/claim #1

@opirebot

opirebot Bot commented Jul 30, 2026

Copy link
Copy Markdown

😅 Unfortunately there are no rewards left to claim in this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🎯 Prevent inconsistent repository state when Worktree.Checkout() sparse checkout updates fail mid-operation

1 participant