{"record":{"id":"48ada29f0cb8c51b","repo":"GitoxideLabs/gitoxide","slug":"only-human-format-is-currently-supported","errorCode":null,"errorMessage":"Only 'human' format is currently supported","messagePattern":"Only 'human' format is currently supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gitoxide-core/src/mailmap.rs","lineNumber":11,"sourceCode":"use std::{collections::HashSet, io::Write, path::Path};\n\nuse anyhow::{Context, bail};\n\nuse crate::OutputFormat;\n\npub const PROGRESS_RANGE: std::ops::RangeInclusive<u8> = 1..=2;\n\npub fn verify(path: impl AsRef<Path>, format: OutputFormat, mut out: impl Write) -> anyhow::Result<()> {\n    if format != OutputFormat::Human {\n        bail!(\"Only 'human' format is currently supported\");\n    }\n    let path = path.as_ref();\n    let buf = std::fs::read(path).with_context(|| format!(\"Failed to read mailmap file at '{}'\", path.display()))?;\n    let mut err_count = 0;\n    for err in gix::mailmap::parse(&buf).filter_map(Result::err) {\n        err_count += 1;\n        writeln!(out, \"{err}\")?;\n    }\n\n    let mut seen = HashSet::<(_, _)>::default();\n    for entry in gix::mailmap::parse(&buf).filter_map(Result::ok) {\n        if !seen.insert((entry.old_email(), entry.old_name())) {\n            writeln!(\n                out,\n                \"NOTE: entry ({:?}, {:?}) -> ({:?}, {:?}) is being overwritten\",\n                entry.old_email(),\n                entry.old_name(),\n                entry.new_email(),","sourceCodeStart":1,"sourceCodeEnd":29,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/mailmap.rs#L1-L29","documentation":"Thrown by `mailmap::verify` when a non-Human output format is requested. Mailmap verification only supports human-readable reporting of parse errors, so any other format is rejected before reading the file.","triggerScenarios":"Calling `gitoxide_core::mailmap::verify(path, OutputFormat::Json, out)` or the CLI mailmap verify command with `--format json`.","commonSituations":"Passing a shared global `--format` flag (e.g. json) to all subcommands; assuming mailmap verify supports JSON like other commands.","solutions":["Use the human format (default) for mailmap verification","Remove the format flag or set it to human","Parse the human output in scripts if machine-readable results are needed"],"exampleFix":"// before\ngix mailmap verify --format json .mailmap\n// after\ngix mailmap verify .mailmap","handlingStrategy":"validation","validationCode":"if format != OutputFormat::Human {\n    format = OutputFormat::Human; // mailmap verify supports human only\n}","typeGuard":null,"tryCatchPattern":"match mailmap::verify(path, format, out) {\n    Ok(()) => (),\n    Err(e) if e.to_string().contains(\"Only 'human' format is currently supported\") => {\n        mailmap::verify(path, OutputFormat::Human, out)?;\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Use the default human format for mailmap verification","Do not forward a shared --format flag to mailmap subcommands","Check feature support before unifying output format across commands"],"tags":["git","mailmap","output-format","cli"],"backgroundTag":"unsupported-operation","analyzedSha":"e73179060badf27222d790981fac3f84c1830a7e","analyzedAt":"2026-09-08T11:26:50.865Z","contentChangedAt":"2026-09-08T11:26:50.865Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}