{"record":{"id":"0ca47e534ffd6e70","repo":"GitoxideLabs/gitoxide","slug":"only-human-output-is-supported-right-now","errorCode":null,"errorMessage":"Only human output is supported right now","messagePattern":"Only human output is supported right now","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"gitoxide-core/src/repository/mailmap.rs","lineNumber":61,"sourceCode":"    if let Err(e) = repo.open_mailmap_into(&mut mailmap) {\n        writeln!(err, \"Error while loading mailmap, the first error is: {e}\").ok();\n    }\n\n    #[cfg(feature = \"serde\")]\n    serde_json::to_writer_pretty(out, &mailmap.iter().map(JsonEntry::from).collect::<Vec<_>>())?;\n\n    Ok(())\n}\n\npub fn check(\n    repo: gix::Repository,\n    format: OutputFormat,\n    contacts: Vec<BString>,\n    mut out: impl io::Write,\n    mut err: impl io::Write,\n) -> anyhow::Result<()> {\n    if format != OutputFormat::Human {\n        bail!(\"Only human output is supported right now\");\n    }\n    if contacts.is_empty() {\n        bail!(\"specify at least one contact to run through the mailmap\")\n    }\n\n    let mut mailmap = gix::mailmap::Snapshot::default();\n    if let Err(err) = repo.open_mailmap_into(&mut mailmap) {\n        bail!(err);\n    }\n\n    let mut buf = Vec::new();\n    for contact in contacts {\n        let actor = match gix::actor::IdentityRef::from_bytes(&contact) {\n            Ok(a) => a,\n            Err(_) => {\n                let Some(email) = contact\n                    .trim_start()\n                    .strip_prefix(b\"<\")","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/repository/mailmap.rs#L43-L79","documentation":"The `gix mailmap check` command only supports human-readable output; requesting any other `--format` (e.g. JSON) raises this message before any mailmap processing happens. It is an explicit capability gate on the output format.","triggerScenarios":"Running `gix mailmap check --format json` (or any non-Human OutputFormat); the check function compares `format != OutputFormat::Human` and bails immediately.","commonSituations":"Scripting mailmap checks and expecting machine-readable output; piping results into a JSON consumer; assuming format options are shared across all gitoxide subcommands.","solutions":["Omit `--format` or use the default human output","Parse the human output if machine consumption is needed temporarily","Post-process the human output or request JSON support upstream"],"exampleFix":"// before\n$ gix mailmap check --format json <contacts>\n// after\n$ gix mailmap check <contacts>","handlingStrategy":"validation","validationCode":"let fmt: OutputFormat = parse_format(args.format);\nif fmt != OutputFormat::Human {\n    // switch to Human or use another tool\n}\n","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"Only human output is supported\") =>\n        eprintln!(\"re-run without --format\"),\n    other => other?,\n}\n","preventionTips":["Assume only human output until JSON lands for mailmap check","Don't share a global --format flag across subcommands blindly"],"tags":["cli","unsupported-format","json"],"backgroundTag":"unsupported-enum-value","analyzedSha":"e73179060badf27222d790981fac3f84c1830a7e","analyzedAt":"2026-09-08T11:26:50.865Z","contentChangedAt":"2026-09-08T11:26:50.865Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}