mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
For the busy query to be usable as a repo-switch guard it has to be false while the ongoing background routines run, or a switch would be refused every time a background fetch or files refresh happened to be in flight. Mark that work as background so it's excluded from the query. The background routine dispatch in goEvery becomes OnWorkerBackground, and the auto-fetch waiting status renders its spinner through the background variants. Within a refresh, the background flag (which Refresh already carries as options.Background, and which the files path already threaded) is now threaded through every place that enqueues a task: the async scope workers, the model-write bounces (onUIThreadUnlessRepoChanged), refreshView, the staging bounce, the Then dispatch, and the branch-loader's behind-count worker. Two single-caller chains reached by a background files refresh get the flag too: MergeConflictsHelper.EscapeMerge and BranchesHelper. AutoForwardBranches (whose follow-up refresh must stay background when triggered by the background fetch). Nothing gates on the busy query yet, so this is behavior-preserving; background tasks still count as busy for the test idle-listener, which looks at every task regardless of the background flag. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app | ||
| cheatsheet | ||
| commands | ||
| common | ||
| config | ||
| constants | ||
| env | ||
| fakes | ||
| gocui | ||
| gui | ||
| i18n | ||
| integration | ||
| jsonschema | ||
| logs | ||
| snake | ||
| tasks | ||
| theme | ||
| updates | ||
| utils | ||