Skip to main content

spawn_git_sequence

Function spawn_git_sequence 

Source
pub fn spawn_git_sequence(
    workdir: PathBuf,
    label: impl Into<String>,
    steps: Vec<GitStep>,
) -> Effect
Expand description

MG.42-E2: run several git invocations in order as ONE operation.

Two properties, both load-bearing:

  1. Aborts on the first failure. Several magit operations are compositions where a half-done result is worse than none — a snapshot whose stash apply never ran is silently just a stash, and the user’s working tree is empty when they expected it restored. Continuing past a failed step manufactures exactly that.
  2. Reports once. One logical operation produces one BackgroundTaskFinished, naming the step that failed rather than the whole sequence. Per-step reporting would turn a two-command operation into two notifications, which is how a notification surface becomes noise.