nikivdev/code · error

f commit failed with status {}

Error message

f commit failed with status {}

What it means

Error "f commit failed with status {}" thrown in nikivdev/code.

Source

Thrown at src/fix.rs:134

    }

    let plan_lines = vec![
        "Plan:".to_string(),
        "  1) git reset --soft HEAD~1  (undo last commit, keep changes staged)".to_string(),
        "  2) f commit                 (recreate commit with updated hygiene)".to_string(),
    ];
    if !confirm_with_tui("Re-commit", &plan_lines, "Proceed? [Y/n]: ")? {
        bail!("Aborted.");
    }

    git_status(repo_root, &["reset", "--soft", "HEAD~1"])?;
    let status = Command::new("f")
        .arg("commit")
        .current_dir(repo_root)
        .status()
        .context("failed to run f commit")?;
    if !status.success() {
        bail!("f commit failed with status {}", status);
    }

    Ok(true)
}

fn confirm_with_tui(title: &str, lines: &[String], prompt: &str) -> Result<bool> {
    if let Some(answer) = opentui_prompt::confirm(title, lines, true) {
        return Ok(answer);
    }

    if !lines.is_empty() {
        for line in lines {
            println!("{}", line);
        }
    }

    confirm_default_yes(prompt)
}

View on GitHub (pinned to a747e741ae)

When it happens

Trigger: Thrown at src/fix.rs:134 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01). Data as JSON: /api/errors/9c63257036056790. Report an issue: GitHub.