Skip to main content

keep_current

Function keep_current 

Source
pub async fn keep_current(
    prj: Prj,
    mirror: Mirror,
    on_pass: impl FnMut(&SyncReport) + Send,
)
Expand description

Keep the machine’s mirror current for as long as the caller runs, and hand every pass’s report to on_pass.

What a process that stays — a workbench, a daemon — runs. Every pass reads what to mirror from the projects again and resolves the token again, so a worktree added or a gh auth login made while it runs is picked up on the next pass rather than at the next restart.