{"record":{"id":"69888c3d78d9ae2f","repo":"GitoxideLabs/gitoxide","slug":"only-human-output-is-currently-supported","errorCode":null,"errorMessage":"Only human output is currently supported","messagePattern":"Only human output is currently supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gitoxide-core/src/repository/commitgraph/list.rs","lineNumber":18,"sourceCode":"pub(crate) mod function {\n    use crate::OutputFormat;\n    use crate::repository::HexId;\n    use anyhow::{Context, bail};\n    use gix::odb::store::RefreshMode;\n    use gix::revision::plumbing::Spec;\n    use gix::{prelude::ObjectIdExt, revision::walk::Sorting};\n    use std::{borrow::Cow, ffi::OsString};\n\n    pub fn list(\n        mut repo: gix::Repository,\n        spec: OsString,\n        mut out: impl std::io::Write,\n        long_hashes: bool,\n        format: OutputFormat,\n    ) -> anyhow::Result<()> {\n        if format != OutputFormat::Human {\n            bail!(\"Only human output is currently supported\");\n        }\n        let graph = repo\n            .commit_graph_if_enabled()\n            .context(\"a commitgraph is required, but none was found\")?;\n        repo.object_cache_size_if_unset(4 * 1024 * 1024);\n        repo.objects.refresh = RefreshMode::Never;\n\n        let spec = gix::path::os_str_into_bstr(&spec)?;\n        let spec = repo.rev_parse(spec)?.detach();\n        let commits = match spec {\n            Spec::Include(id) => connected_commit_id(&repo, id)?\n                .ancestors()\n                .sorting(Sorting::ByCommitTime(Default::default()))\n                .all()?,\n            Spec::Range { from, to } => connected_commit_id(&repo, to)?\n                .ancestors()\n                .sorting(Sorting::ByCommitTime(Default::default()))\n                .with_hidden(Some(connected_commit_id(&repo, from)?))","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/repository/commitgraph/list.rs#L1-L36","documentation":"Guard at the start of `commitgraph::list`, which prints commitgraph entries (commit IDs, generation numbers, parents) for a rev-spec. The function only renders human-readable text; a non-Human OutputFormat triggers this bail before the repository walk begins. It fires when `gix repo commit-graph list --format json` (or another machine format) is requested and is a not-yet-implemented feature signal rather than a runtime failure of the graph itself.","triggerScenarios":"Calling `list` with `OutputFormat::Json` (e.g. `gix commitgraph list --format json`).","commonSituations":"Automating commit-graph inspection with structured output; tooling that uniformly passes `--format json` to all gix subcommands.","solutions":["Use `OutputFormat::Human`","Read the commit-graph files via `gix::repository::commit_graph_if_enabled` in your own code and serialize yourself","Request/track JSON support upstream"],"exampleFix":"// before\nlist(repo, spec, &mut out, long_hashes, OutputFormat::Json)?;\n// after\nlist(repo, spec, &mut out, long_hashes, OutputFormat::Human)?;","handlingStrategy":"validation","validationCode":"if format != gix::output_format::OutputFormat::Human {\n    anyhow::bail!(\"commitgraph list supports only human output\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use Human format for commitgraph tooling","Check subcommand help for supported --format values"],"tags":["cli","commitgraph","output-format"],"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-15T23:17:13.987Z"}