Skip to content

fix: index lock race#44

Merged
bakayu merged 1 commit intomasterfrom
fix-index-lock-race
Feb 24, 2026
Merged

fix: index lock race#44
bakayu merged 1 commit intomasterfrom
fix-index-lock-race

Conversation

@bakayu
Copy link
Member

@bakayu bakayu commented Feb 24, 2026

Closes #42

The commandExecutedMsg handler already calls fetchPanelContent for FilesPanel, CommitsPanel, BranchesPanel, and StatusPanel. By removing the duplicate concurrent fetches from the action handlers, the git write operation completes and releases "index.lock" before any read operations begin. Before using tea.Batch, all commands were running concurrently resulting in a race condition over index.lock.

The `commandExecutedMsg` handler already calls `fetchPanelContent` for `FilesPanel`, `CommitsPanel`, `BranchesPanel`, and `StatusPanel`. By removing the duplicate concurrent fetches from the action handlers, the git write operation completes and releases "index.lock" before any read operations begin. Before using `tea.Batch`, all commands were running concurrently resulting in a race condition over `index.lock`.
@bakayu bakayu merged commit 7e0315e into master Feb 24, 2026
2 checks passed
@Arjunuk1 Arjunuk1 mentioned this pull request Feb 24, 2026
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.

Error when staging files

1 participant