{"record":{"id":"a6d009008534244c","repo":"GitoxideLabs/gitoxide","slug":"json-output-isn-t-implemented-yet-a6d009","errorCode":null,"errorMessage":"JSON output isn't implemented yet","messagePattern":"JSON output isn't implemented yet","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"gitoxide-core/src/repository/merge/file.rs","lineNumber":27,"sourceCode":"        builtin_driver::{binary, text::Conflict},\n        pipeline::WorktreeRoots,\n    },\n    object::tree::EntryKind,\n};\n\nuse crate::OutputFormat;\n\npub fn file(\n    repo: gix::Repository,\n    out: &mut dyn std::io::Write,\n    format: OutputFormat,\n    conflict: Option<gix::merge::blob::builtin_driver::text::Conflict>,\n    base: BString,\n    ours: BString,\n    theirs: BString,\n) -> anyhow::Result<()> {\n    if format != OutputFormat::Human {\n        bail!(\"JSON output isn't implemented yet\");\n    }\n    let base = repo.normalize_path(&base)?;\n    let ours = repo.normalize_path(&ours)?;\n    let theirs = repo.normalize_path(&theirs)?;\n\n    let base_id = repo.rev_parse_single(base.as_ref()).ok();\n    let ours_id = repo.rev_parse_single(ours.as_ref()).ok();\n    let theirs_id = repo.rev_parse_single(theirs.as_ref()).ok();\n    let roots = worktree_roots(base_id, ours_id, theirs_id, repo.workdir())?;\n\n    let mut cache = repo.merge_resource_cache(roots)?;\n    let null = repo.object_hash().null();\n    cache.set_resource(\n        base_id.map_or(null, Id::detach),\n        EntryKind::Blob,\n        base.as_ref(),\n        ResourceKind::CommonAncestorOrBase,\n        &repo.objects,","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/repository/merge/file.rs#L9-L45","documentation":"Guard at the start of `merge::file`, the plumbing entry that runs the builtin file-merge driver over base/ours/theirs contents and prints the conflict outcome. Only human output rendering exists; requesting JSON (or any non-Human format) bails before path normalization and the merge run. It fires on `--format json` style invocations and signals an unimplemented output serializer, not a merge failure.","triggerScenarios":"Running `gix merge file --format json` (or any non-Human format); the guard `format != OutputFormat::Human` fails immediately.","commonSituations":"Scripting blob-level merges and wanting structured conflict output; sharing a global `--format` flag; comparing merge tool outputs programmatically.","solutions":["Use the default human output format","Write the three-way merge via the gix library (`gix::merge::blob`) and serialize results yourself","Wait for/ask for JSON support upstream"],"exampleFix":"// before\n$ gix merge file --format json base ours theirs\n// after\n$ gix merge file base ours theirs","handlingStrategy":"validation","validationCode":"if format != OutputFormat::Human {\n    // use human output for file merge\n}\n","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"JSON output isn't implemented\") =>\n        eprintln!(\"re-run with human output\"),\n    other => other?,\n}\n","preventionTips":["Keep per-subcommand format support tables in wrapper scripts","Default to human output for blob merges"],"tags":["cli","unsupported-format","json"],"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-16T04:17:20.429Z"}