{"record":{"id":"462d87b23376c456","repo":"GitoxideLabs/gitoxide","slug":"only-human-output-format-is-supported-at-the-momen-462d87","errorCode":null,"errorMessage":"Only human output format is supported at the moment","messagePattern":"Only human output format is supported at the moment","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"gitoxide-core/src/repository/odb.rs","lineNumber":268,"sourceCode":"        )?;\n\n        progress.show_throughput(start);\n        if errors.contains(&true) {\n            bail!(\"At least one object couldn't be looked up even though it must exist\");\n        }\n    }\n\n    #[cfg(feature = \"serde\")]\n    {\n        serde_json::to_writer_pretty(out, &stats)?;\n    }\n\n    Ok(())\n}\n\npub fn entries(repo: gix::Repository, format: OutputFormat, mut out: impl io::Write) -> anyhow::Result<()> {\n    if format != OutputFormat::Human {\n        bail!(\"Only human output format is supported at the moment\");\n    }\n\n    for object in repo.objects.iter()? {\n        let object = object?;\n        writeln!(out, \"{object}\")?;\n    }\n\n    Ok(())\n}\n","sourceCodeStart":250,"sourceCodeEnd":278,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/repository/odb.rs#L250-L278","documentation":"The `gix repo odb entries` command lists all objects in the object database but only supports human-readable output. Requesting any other `OutputFormat` (e.g. JSON) bails, as the serializer was not implemented for this subcommand.","triggerScenarios":"Calling `entries()` in gitoxide-core/src/repository/odb.rs with `format != OutputFormat::Human`.","commonSituations":"Scripts requesting `--format json` for object listings; assuming format parity across gitoxide subcommands.","solutions":["Use the default human output and parse the printed object entries.","Enumerate objects via the library API (`repo.objects.iter()`) and serialize them yourself for structured output.","Contribute JSON support to `entries` if machine-readable output is needed."],"exampleFix":"// before\ngix repo odb entries --format json\n// after\ngix repo odb entries  # human-readable listing","handlingStrategy":"validation","validationCode":"if format != OutputFormat::Human {\n    eprintln!(\"odb entries supports human output only\");\n    format = OutputFormat::Human;\n}","typeGuard":null,"tryCatchPattern":"match odb_entries(repo, format, out) {\n    Err(e) if e.to_string().contains(\"Only human output\") => use_library_api_for_json(),\n    r => r?,\n}","preventionTips":["Use `repo.objects.iter()` via the library when you need structured object listings.","Keep CLI scripting to the documented default output formats."],"tags":["cli","odb","output-format","gitoxide"],"backgroundTag":"unsupported-operation","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"}