Skip to main content

spawn_remote_op_to

Function spawn_remote_op_to 

Source
pub fn spawn_remote_op_to(
    workdir: PathBuf,
    op: RemoteOp,
    args: &Args,
    target: RemoteTarget,
    prompted: Option<String>,
) -> Effect
Expand description

Run op off the actor thread and return the optimistic echo.

GIT_TERMINAL_PROMPT=0 (in [run_remote_op]) makes a missing or expired credential fail fast and cleanly instead of hanging the background task on interactive input that can never arrive. The echo returns synchronously; the real outcome lands via tracing, same as every other detached background mutation in this crate — no synchronous path exists back to the echo area from a task that outlives the call, so success and failure are logged rather than silently dropped (never both silent AND absent). MG.41c: run a remote op against an explicit RemoteTarget.

One handler for every destination row. Upstream resolves @{upstream} on the blocking pool before running — it needs a git call, and doing it here rather than at menu-build time keeps the menu free of I/O.

A destination that cannot be resolved aborts rather than falling back to a bare push. Falling back would silently send refs somewhere the user did not choose, which is the one failure this row must not have.