{"record":{"id":"98a5dd029017d039","repo":"GitoxideLabs/gitoxide","slug":"only-human-format-is-supported-right-now-98a5dd","errorCode":null,"errorMessage":"Only human format is supported right now","messagePattern":"Only human format is supported right now","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"gitoxide-core/src/repository/dirwalk.rs","lineNumber":36,"sourceCode":"pub struct Options {\n    pub output_format: OutputFormat,\n    pub statistics: bool,\n    pub untracked: Untracked,\n}\n\npub fn walk(\n    repo: gix::Repository,\n    patterns: Vec<BString>,\n    mut out: impl std::io::Write,\n    mut err: impl std::io::Write,\n    Options {\n        output_format,\n        statistics,\n        untracked,\n    }: Options,\n) -> anyhow::Result<()> {\n    if output_format != OutputFormat::Human {\n        bail!(\"Only human format is supported right now\");\n    }\n    let index = repo.index_or_empty()?;\n    let options = repo.dirwalk_options()?.emit_untracked(match untracked {\n        Untracked::Collapsed => EmissionMode::CollapseDirectory,\n        Untracked::Matching => EmissionMode::Matching,\n    });\n\n    let start = std::time::Instant::now();\n    let mut delegate = Count::default();\n    let outcome = repo.dirwalk(\n        &index,\n        patterns,\n        &gix::interrupt::IS_INTERRUPTED,\n        options,\n        &mut delegate,\n    )?;\n\n    if statistics {","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/repository/dirwalk.rs#L18-L54","documentation":"The `dirwalk` command enumerates untracked files but only implements human-readable output. Any other `output_format` (i.e. JSON) throws this error because structured serialization of dirwalk results is not yet implemented.","triggerScenarios":"Calling `walk` in gitoxide-core/src/repository/dirwalk.rs with `Options.output_format != OutputFormat::Human`, e.g. `gix status dirwalk --format json`.","commonSituations":"Automation scripts requesting JSON output of untracked files; developers copying the `--format json` flag pattern from other supported subcommands.","solutions":["Use the default human format (omit the format flag or pass `human`)","Post-process the human output if automation requires structured data (fragile)","Implement or request JSON support for the dirwalk subcommand"],"exampleFix":"// before\ndirwalk::walk(repo, dirwalk::Options { output_format: OutputFormat::Json, .. })?;\n// after\ndirwalk::walk(repo, dirwalk::Options { output_format: OutputFormat::Human, .. })?;","handlingStrategy":"validation","validationCode":"if output_format != OutputFormat::Human {\n    eprintln!(\"dirwalk only supports human output\");\n    output_format = OutputFormat::Human;\n}","typeGuard":null,"tryCatchPattern":"match dirwalk::walk(repo, options) {\n    Err(e) if e.to_string().contains(\"human format\") => {\n        dirwalk::walk(repo, options_with_human_format)?\n    }\n    other => other?,\n}","preventionTips":["Do not request JSON from dirwalk until implemented","Verify per-subcommand format support in --help","Keep automation parsing of dirwalk output aware it is line-based text"],"tags":["cli","dirwalk","not-implemented"],"backgroundTag":"method-not-implemented","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"}