GitoxideLabs/gitoxide · error · anyhow::Error
Only human format is supported right now
Error message
Only human format is supported right now
What it means
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.
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
Example fix
// before
dirwalk::walk(repo, dirwalk::Options { output_format: OutputFormat::Json, .. })?;
// after
dirwalk::walk(repo, dirwalk::Options { output_format: OutputFormat::Human, .. })?; Defensive patterns
Strategy: validation
Validate before calling
if output_format != OutputFormat::Human {
eprintln!("dirwalk only supports human output");
output_format = OutputFormat::Human;
} Try / catch
match dirwalk::walk(repo, options) {
Err(e) if e.to_string().contains("human format") => {
dirwalk::walk(repo, options_with_human_format)?
}
other => other?,
} Prevention
- 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
When it happens
Trigger: Calling `walk` in gitoxide-core/src/repository/dirwalk.rs with `Options.output_format != OutputFormat::Human`, e.g. `gix status dirwalk --format json`.
Common situations: Automation scripts requesting JSON output of untracked files; developers copying the `--format json` flag pattern from other supported subcommands.
Related errors
- JSON output isn't implemented yet
- JSON output isn't implemented yet
- JSON output isn't yet supported for fetching.
- JSON output isn't yet supported for listing ref-mappings.
- Only human output is currently supported
AI-assisted analysis of GitoxideLabs/gitoxide@e73179060b (2026-09-08).
Data as JSON: /api/errors/98a5dd029017d039.
Report an issue: GitHub.
Appendix: source
Thrown at gitoxide-core/src/repository/dirwalk.rs:36
pub struct Options {
pub output_format: OutputFormat,
pub statistics: bool,
pub untracked: Untracked,
}
pub fn walk(
repo: gix::Repository,
patterns: Vec<BString>,
mut out: impl std::io::Write,
mut err: impl std::io::Write,
Options {
output_format,
statistics,
untracked,
}: Options,
) -> anyhow::Result<()> {
if output_format != OutputFormat::Human {
bail!("Only human format is supported right now");
}
let index = repo.index_or_empty()?;
let options = repo.dirwalk_options()?.emit_untracked(match untracked {
Untracked::Collapsed => EmissionMode::CollapseDirectory,
Untracked::Matching => EmissionMode::Matching,
});
let start = std::time::Instant::now();
let mut delegate = Count::default();
let outcome = repo.dirwalk(
&index,
patterns,
&gix::interrupt::IS_INTERRUPTED,
options,
&mut delegate,
)?;
if statistics {View on GitHub (pinned to e73179060b)