GitoxideLabs/gitoxide · info · anyhow::Error

Only human output is currently supported

Error message

Only human output is currently supported

What it means

The `gix revision list` command only implements human-readable output; requesting any other `OutputFormat` (e.g. JSON) makes `list` bail before doing traversal work. Like the other format guards in gitoxide-core, this is a not-yet-implemented notice, not an operational failure.

Solutions

  1. Use the default human output for `gix revision list`
  2. Do JSON parsing of commit traversal via the `gix` Rust library instead of the CLI
  3. Check newer gitoxide releases for added JSON support for this subcommand
  4. Post-process the human output if scripting is required

Example fix

// before
gix revision list HEAD --format json
// after
gix revision list HEAD
Defensive patterns

Strategy: validation

Validate before calling

if [ "$fmt" != "human" ]; then echo "revision list supports only human output" >&2; exit 2; fi
gix revision list "$spec" --format "$fmt"

Try / catch

if ! gix revision list "$spec" --format json 2>&1 | grep -q 'Only human output'; then :; else gix revision list "$spec"; fi

Prevention

When it happens

Trigger: Calling `gix revision list --format json` (or any non-Human OutputFormat) — the check at the top of `list` in gitoxide-core/src/repository/revision/list.rs rejects it immediately.

Common situations: Users scripting against gitoxide CLI assume JSON is available because other commands advertise serde support, or older invocations pass a format flag this subcommand doesn't honor yet.

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/0ba34ee59088d763. Report an issue: GitHub.

Appendix: source

Thrown at gitoxide-core/src/repository/revision/list.rs:44

        backends::svg::SVGWriter,
        core::{base::Orientation, geometry::Point, style::StyleAttr},
        std_shapes::shapes::{Arrow, Element, ShapeKind},
    };

    pub fn list(
        mut repo: gix::Repository,
        mut progress: impl Progress,
        mut out: impl std::io::Write,
        super::Context {
            spec,
            format,
            text,
            limit,
            long_hashes,
        }: super::Context,
    ) -> anyhow::Result<()> {
        if format != OutputFormat::Human {
            bail!("Only human output is currently supported");
        }
        repo.object_cache_size_if_unset(4 * 1024 * 1024);
        repo.objects.refresh = RefreshMode::Never;

        let spec = gix::path::os_str_into_bstr(&spec)?;
        let id = repo
            .rev_parse_single(spec)
            .context("Only single revisions are currently supported")?;
        let commits = id
            .object()?
            .peel_to_kind(gix::object::Kind::Commit)
            .context("Need committish as starting point")?
            .id()
            .ancestors()
            .sorting(Sorting::ByCommitTime(Default::default()))
            .all()?;

        let mut vg = match text {

View on GitHub (pinned to e73179060b)