GitoxideLabs/gitoxide · error · anyhow::Error
JSON output isn't implemented yet
Error message
JSON output isn't implemented yet
What it means
`gix merge commit` only supports human output; requesting JSON (or any non-Human OutputFormat) raises this message before the merge begins. The JSON rendering for this subcommand is simply not implemented yet.
Solutions
- Use the default human output format
- Capture and parse the human/JSON debug output of conflicts differently (the command writes conflict details to stderr)
- Implement or await JSON support upstream in gitoxide
Example fix
// before $ gix merge commit --format json ours theirs // after $ gix merge commit ours theirs
Defensive patterns
Strategy: validation
Validate before calling
if format != OutputFormat::Human {
// fall back to human output for merge commit
}
Try / catch
match result {
Err(e) if e.to_string().contains("JSON output isn't implemented") =>
eprintln!("re-run with human output"),
other => other?,
}
Prevention
- Use human output for merge commit until JSON exists
- Gate --format json behind per-subcommand support checks in wrappers
When it happens
Trigger: Running `gix merge commit --format json ...`; the check `format != OutputFormat::Human` bails immediately, before any merge work is done.
Common situations: Scripted merge analysis expecting JSON output; reusing a shared `--format` flag across subcommands; automation comparing merge results programmatically.
Related errors
- Only human output is supported right now
- JSON output isn't implemented yet
- JSON output isn't implemented yet
- JSON output isn't supported
- JSON output isn't implemented yet
AI-assisted analysis of GitoxideLabs/gitoxide@e73179060b (2026-09-08).
Data as JSON: /api/errors/88f4c6c7abd2b50a.
Report an issue: GitHub.
Appendix: source
Thrown at gitoxide-core/src/repository/merge/commit.rs:28
pub fn commit(
mut repo: gix::Repository,
out: &mut dyn std::io::Write,
err: &mut dyn std::io::Write,
ours: BString,
theirs: BString,
Options {
format,
file_favor,
tree_favor,
in_memory,
debug,
message: _,
update_head: _,
}: Options,
) -> anyhow::Result<()> {
if format != OutputFormat::Human {
bail!("JSON output isn't implemented yet");
}
repo.object_cache_size_if_unset(repo.compute_object_cache_size_for_tree_diffs(&**repo.index_or_empty()?));
if in_memory {
repo.objects.enable_object_memory();
}
let (ours_ref, ours_id) = refname_and_commit(&repo, ours)?;
let (theirs_ref, theirs_id) = refname_and_commit(&repo, theirs)?;
let options = repo
.tree_merge_options()?
.with_file_favor(file_favor)
.with_tree_favor(tree_favor);
let ours_id_str = ours_id.to_string();
let theirs_id_str = theirs_id.to_string();
let labels = gix::merge::blob::builtin_driver::text::Labels {
ancestor: None,
current: ours_ref
.as_ref()View on GitHub (pinned to e73179060b)