mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-21 04:46:29 +03:00
Now that every commits-reaching refresh issued from a worker goes through RefreshFromWorker, guard the choice: in debug builds, panic if a refresh was issued from the UI thread as RefreshFromWorker or from a worker as Refresh. The caller's own goroutine is recorded at the top of performRefresh, before a BLOCK_UI refresh dispatches onto the UI thread, so the check holds for every mode rather than being fooled by BLOCK_UI. It's scoped to the commits refresh for now, the only converted scope; once the rest are converted the guard can move up to cover every refresh unconditionally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>