{"record":{"id":"5bfd8d38011de8ea","repo":"GitoxideLabs/gitoxide","slug":"json-output-isn-t-yet-supported-for-fetching","errorCode":null,"errorMessage":"JSON output isn't yet supported for fetching.","messagePattern":"JSON output isn't yet supported for fetching\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gitoxide-core/src/repository/clone.rs","lineNumber":46,"sourceCode":"        mut progress: P,\n        mut out: impl std::io::Write,\n        mut err: impl std::io::Write,\n        Options {\n            format,\n            handshake_info,\n            bare,\n            no_tags,\n            ref_name,\n            revision,\n            shallow,\n        }: Options,\n    ) -> anyhow::Result<()>\n    where\n        P: NestedProgress,\n        P::SubProgress: 'static,\n    {\n        if format != OutputFormat::Human {\n            bail!(\"JSON output isn't yet supported for fetching.\");\n        }\n\n        let url: gix::Url = url.as_ref().try_into()?;\n        let directory = directory.map_or_else(\n            || {\n                let path = gix::path::from_bstr(Cow::Borrowed(url.path.as_ref()));\n                if !bare && path.extension() == Some(OsStr::new(\"git\")) {\n                    path.file_stem().map(Into::into)\n                } else {\n                    path.file_name().map(Into::into)\n                }\n                .context(\"Filename extraction failed - path too short\")\n            },\n            |dir| Ok(dir.into()),\n        )?;\n        let mut prepare = gix::clone::PrepareFetch::new(\n            url,\n            directory,","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/repository/clone.rs#L28-L64","documentation":"`clone` (fetch) only supports human-readable progress output; a non-Human `OutputFormat` is rejected up front with `bail!` before any network work starts. JSON streaming of fetch progress is not implemented.","triggerScenarios":"Calling `gitoxide_core::repository::clone::clone` with `OutputFormat::Json` (e.g. `gix clone --format json <url>`).","commonSituations":"Tooling that standardizes on JSON output for all subcommands; parsing clone progress programmatically; CI dashboards expecting structured events.","solutions":["Use `OutputFormat::Human` for cloning","Drive `gix::clone` / fetch programmatically in your own code and consume the progress events directly for structured output","Track upstream gitoxide for JSON clone support"],"exampleFix":"// before\nclone(url, directory, repo, OutputFormat::Json, progress, &mut out)?;\n// after\nclone(url, directory, repo, OutputFormat::Human, progress, &mut out)?;","handlingStrategy":"validation","validationCode":"assert_eq!(format, gix::output_format::OutputFormat::Human, \"clone supports only human output\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use programmatic gix::clone APIs when structured progress is needed","Keep a table of which subcommands support JSON"],"tags":["cli","clone","output-format","unimplemented-feature"],"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"}