Problem: `push` and `pull` both run via `oauth.async`, so issuing them back-to-back starts two coroutines that interleave at every curl yield. Both snapshot `build_id_index` before either has mutated the store, which can cause push to create a remote task that pull would have recognized as already linked, producing duplicates on Google. Solution: guard `with_token` with a module-level `_in_flight` flag set before `oauth.async` is called so no second operation can start during a token-refresh yield. A `pcall` around the callback guarantees the flag is always cleared, even on an unexpected error. |
||
|---|---|---|
| .. | ||
| sync | ||
| buffer.lua | ||
| complete.lua | ||
| config.lua | ||
| diff.lua | ||
| health.lua | ||
| init.lua | ||
| log.lua | ||
| parse.lua | ||
| recur.lua | ||
| store.lua | ||
| textobj.lua | ||
| views.lua | ||