{"record":{"id":"2b4dc40b28998418","repo":"GitoxideLabs/gitoxide","slug":"interrupted-by-user-2b4dc4","errorCode":null,"errorMessage":"interrupted by user","messagePattern":"interrupted by user","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"info","filePath":"gitoxide-core/src/repository/status.rs","lineNumber":199,"sourceCode":"            }) => {\n                // TODO: handle multi-status characters, there can also be modifications at the same time as determined by their ID and potentially diffstats.\n                writeln!(\n                    out,\n                    \"{status: >3} {source_rela_path} → {dest_rela_path}\",\n                    status = \"R\",\n                    source_rela_path =\n                        gix::path::relativize_with_prefix(&gix::path::from_bstr(source.rela_path()), prefix).display(),\n                    dest_rela_path = gix::path::relativize_with_prefix(\n                        &gix::path::from_bstr(dirwalk_entry.rela_path.as_bstr()),\n                        prefix\n                    )\n                    .display(),\n                )?;\n            }\n        }\n    }\n    if gix::interrupt::is_triggered() {\n        bail!(\"interrupted by user\");\n    }\n\n    let out = iter.outcome_mut().expect(\"successful iteration has outcome\");\n\n    if out.has_changes() && allow_write {\n        out.write_changes().transpose()?;\n    }\n\n    if statistics {\n        writeln!(err, \"{outcome:#?}\", outcome = out.index_worktree).ok();\n    }\n\n    progress.init(Some(out.worktree_index.entries().len()), gix::progress::count(\"files\"));\n    progress.set(out.worktree_index.entries().len());\n    progress.show_throughput(start);\n    Ok(())\n}\n","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/repository/status.rs#L181-L217","documentation":"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.","triggerScenarios":"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.","commonSituations":"User cancelling a slow status scan on huge worktrees; CI sending SIGTERM-like interrupts; terminal closing mid-command.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"gix status show || handle_interrupt  # detect 'interrupted by user' in stderr and exit 130","preventionTips":["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"],"tags":["cli","interrupt","signal","status"],"backgroundTag":"operation-interrupted-by-user","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"}