GitoxideLabs/gitoxide · error

Only 'human' format is currently supported

Error message

Only 'human' format is currently supported

What it means

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.

Solutions

  1. Use the human format (default) for mailmap verification
  2. Remove the format flag or set it to human
  3. Parse the human output in scripts if machine-readable results are needed

Example fix

// before
gix mailmap verify --format json .mailmap
// after
gix mailmap verify .mailmap
Defensive patterns

Strategy: validation

Validate before calling

if format != OutputFormat::Human {
    format = OutputFormat::Human; // mailmap verify supports human only
}

Try / catch

match mailmap::verify(path, format, out) {
    Ok(()) => (),
    Err(e) if e.to_string().contains("Only 'human' format is currently supported") => {
        mailmap::verify(path, OutputFormat::Human, out)?;
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Calling `gitoxide_core::mailmap::verify(path, OutputFormat::Json, out)` or the CLI mailmap verify command with `--format json`.

Common situations: Passing a shared global `--format` flag (e.g. json) to all subcommands; assuming mailmap verify supports JSON like other commands.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of GitoxideLabs/gitoxide@e73179060b (2026-09-08). Data as JSON: /api/errors/48ada29f0cb8c51b. Report an issue: GitHub.

Appendix: source

Thrown at gitoxide-core/src/mailmap.rs:11

use std::{collections::HashSet, io::Write, path::Path};

use anyhow::{Context, bail};

use crate::OutputFormat;

pub const PROGRESS_RANGE: std::ops::RangeInclusive<u8> = 1..=2;

pub fn verify(path: impl AsRef<Path>, format: OutputFormat, mut out: impl Write) -> anyhow::Result<()> {
    if format != OutputFormat::Human {
        bail!("Only 'human' format is currently supported");
    }
    let path = path.as_ref();
    let buf = std::fs::read(path).with_context(|| format!("Failed to read mailmap file at '{}'", path.display()))?;
    let mut err_count = 0;
    for err in gix::mailmap::parse(&buf).filter_map(Result::err) {
        err_count += 1;
        writeln!(out, "{err}")?;
    }

    let mut seen = HashSet::<(_, _)>::default();
    for entry in gix::mailmap::parse(&buf).filter_map(Result::ok) {
        if !seen.insert((entry.old_email(), entry.old_name())) {
            writeln!(
                out,
                "NOTE: entry ({:?}, {:?}) -> ({:?}, {:?}) is being overwritten",
                entry.old_email(),
                entry.old_name(),
                entry.new_email(),

View on GitHub (pinned to e73179060b)