{"record":{"id":"eeff10357168f956","repo":"GitoxideLabs/gitoxide","slug":"only-human-format-is-supported-right-now","errorCode":null,"errorMessage":"Only human format is supported right now","messagePattern":"Only human format is supported right now","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gitoxide-core/src/pack/multi_index.rs","lineNumber":84,"sourceCode":"    #[cfg(feature = \"serde\")]\n    {\n        let file = gix::odb::pack::multi_index::File::at(&multi_index_path, None)?;\n        serde_json::to_writer_pretty(\n            out,\n            &info::Statistics {\n                path: multi_index_path,\n                num_objects: file.num_objects(),\n                index_names: file.index_names().to_vec(),\n                object_hash: file.object_hash().to_string(),\n            },\n        )?;\n    }\n    Ok(())\n}\n\npub fn entries(multi_index_path: PathBuf, format: OutputFormat, mut out: impl std::io::Write) -> anyhow::Result<()> {\n    if format != OutputFormat::Human {\n        bail!(\"Only human format is supported right now\");\n    }\n    let file = gix::odb::pack::multi_index::File::at(multi_index_path, None)?;\n    for entry in file.iter() {\n        writeln!(out, \"{} {} {}\", entry.oid, entry.pack_index, entry.pack_offset)?;\n    }\n    Ok(())\n}\n","sourceCodeStart":66,"sourceCodeEnd":92,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/pack/multi_index.rs#L66-L92","documentation":"Thrown by `pack::multi_index::entries` when a non-Human output format is requested. The multi-index entry listing only implements plain-text printing, so JSON or other formats are rejected immediately.","triggerScenarios":"Calling `gitoxide_core::pack::multi_index::entries(path, OutputFormat::Json, out)` or the CLI command with `--format json` for a multi-pack-index file.","commonSituations":"Scripts passing a uniform `--format json` flag to all gix subcommands; expecting the multi-index entries command to support JSON output.","solutions":["Use the default human format (omit the format flag)","Set the format explicitly to human","For machine processing, parse the `oid pack_index pack_offset` text lines"],"exampleFix":"// before\ngix pack multi-index entries --format json objects/pack/multi-pack-index\n// after\ngix pack multi-index entries objects/pack/multi-pack-index","handlingStrategy":"validation","validationCode":"if format != OutputFormat::Human {\n    format = OutputFormat::Human; // multi-index entries supports human only\n}","typeGuard":null,"tryCatchPattern":"match multi_index::entries(path, format, out) {\n    Ok(()) => (),\n    Err(e) if e.to_string().contains(\"Only human format is supported right now\") => {\n        multi_index::entries(path, OutputFormat::Human, out)?;\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Omit the --format flag for multi-index entries","Parse the human text lines (`oid pack_index pack_offset`) for scripts","Confirm per-command format support before adding shared flags"],"tags":["git","pack","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"}