GitoxideLabs/gitoxide · info · anyhow::Error
interrupted by user
Error message
interrupted by user
What it means
After finishing index/worktree status iteration, `show` checks gix's global interrupt flag and bails with 'interrupted by user' so the command exits cleanly instead of proceeding to write changes or print results. This is the end-of-operation interrupt checkpoint complementing per-item checks elsewhere.
Solutions
- Expected behavior on cancellation — just re-run the command
- Reduce worktree size or ignore untracked files to speed status
- Avoid interrupting if changes (e.g. `--allow-write` index updates) must be applied
- Check exit status in scripts to distinguish cancelled runs from real failures
Defensive patterns
Strategy: try-catch
Try / catch
gix status show || handle_interrupt # detect 'interrupted by user' in stderr and exit 130
Prevention
- Avoid Ctrl-C during status scans of large worktrees; narrow the path first
- Configure .gitignore to reduce untracked-file scanning cost
- Treat interrupt exits separately from genuine status failures in automation
- Use gix::interrupt in your own long loops for graceful cancellation
When it happens
Trigger: Receiving SIGINT/Ctrl-C (or `gix::interrupt::trigger()`) at any point while `gix status show` runs — checked at gitoxide-core/src/repository/status.rs:199 after iteration completes.
Common situations: User cancelling a slow status scan on huge worktrees; CI sending SIGTERM-like interrupts; terminal closing mid-command.
Related errors
- interrupted by user
- interrupted by user
- Cancelled by user
- {msg} {suffix}
- Only human format is supported right now
AI-assisted analysis of GitoxideLabs/gitoxide@e73179060b (2026-09-08).
Data as JSON: /api/errors/2b4dc40b28998418.
Report an issue: GitHub.
Appendix: source
Thrown at gitoxide-core/src/repository/status.rs:199
}) => {
// TODO: handle multi-status characters, there can also be modifications at the same time as determined by their ID and potentially diffstats.
writeln!(
out,
"{status: >3} {source_rela_path} → {dest_rela_path}",
status = "R",
source_rela_path =
gix::path::relativize_with_prefix(&gix::path::from_bstr(source.rela_path()), prefix).display(),
dest_rela_path = gix::path::relativize_with_prefix(
&gix::path::from_bstr(dirwalk_entry.rela_path.as_bstr()),
prefix
)
.display(),
)?;
}
}
}
if gix::interrupt::is_triggered() {
bail!("interrupted by user");
}
let out = iter.outcome_mut().expect("successful iteration has outcome");
if out.has_changes() && allow_write {
out.write_changes().transpose()?;
}
if statistics {
writeln!(err, "{outcome:#?}", outcome = out.index_worktree).ok();
}
progress.init(Some(out.worktree_index.entries().len()), gix::progress::count("files"));
progress.set(out.worktree_index.entries().len());
progress.show_throughput(start);
Ok(())
}
View on GitHub (pinned to e73179060b)