{"record":{"id":"00f8a6aaa47f8133","repo":"nikivdev/code","slug":"no-staged-changes-to-commit","errorCode":null,"errorMessage":"No staged changes to commit","messagePattern":"No staged changes to commit","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/commit.rs","lineNumber":2032,"sourceCode":"\n    // Check for sensitive files before proceeding\n    let sensitive_files = check_sensitive_files(&repo_root);\n    warn_sensitive_files(&sensitive_files)?;\n\n    // Scan diff content for hardcoded secrets\n    let secret_findings = scan_diff_for_secrets(&repo_root);\n    warn_secrets_in_diff(&repo_root, &secret_findings)?;\n\n    // Check for files with large diffs\n    let large_diffs = check_large_diffs(&repo_root);\n    warn_large_diffs(&large_diffs)?;\n\n    // Get diff\n    let diff = git_capture_in(&repo_root, &[\"diff\", \"--cached\"])?;\n    if diff.trim().is_empty() {\n        println!(\"\\nnotify: No staged changes to commit\");\n        print_pending_queue_review_hint(&repo_root);\n        bail!(\"No staged changes to commit\");\n    }\n    debug!(diff_len = diff.len(), \"got cached diff\");\n\n    // Get status\n    let status = git_capture_in(&repo_root, &[\"status\", \"--short\"]).unwrap_or_default();\n    debug!(status_lines = status.lines().count(), \"got git status\");\n\n    // Truncate diff if needed\n    let (diff_for_prompt, truncated) = truncate_diff(&diff);\n    debug!(\n        truncated = truncated,\n        prompt_len = diff_for_prompt.len(),\n        \"prepared diff for prompt\"\n    );\n\n    // Generate commit message\n    print!(\"Generating commit message... \");\n    io::stdout().flush()?;","sourceCodeStart":2014,"sourceCodeEnd":2050,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/commit.rs#L2014-L2050","documentation":"Error \"No staged changes to commit\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/commit.rs:2032 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}