{"record":{"id":"354ce4669aa42a77","repo":"GitoxideLabs/gitoxide","slug":"no-commits-to-process","errorCode":null,"errorMessage":"No commits to process","messagePattern":"No commits to process","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gitoxide-core/src/hours/mod.rs","lineNumber":301,"sourceCode":"                    change_progress.show_throughput(start);\n                    line_progress.show_throughput(start);\n                    stats\n                }\n                None => Vec::new(),\n            };\n\n            Ok((\n                extract_signatures.join().expect(\"no panic\")?,\n                stats_by_commit_idx,\n                is_shallow,\n                skipped_merge_commits,\n                commit_idx,\n            ))\n        })?\n    };\n\n    if commit_authors.is_empty() {\n        bail!(\"No commits to process\");\n    }\n\n    let start = Instant::now();\n    let mut current_email = &commit_authors[0].1.email;\n    let mut slice_start = 0;\n    let mut results_by_hours = Vec::new();\n    let mut ignored_bot_commits = 0_u32;\n    let mut push_estimate = |commits: &[(u32, SignatureRef<'static>)]| {\n        let estimate = estimate_hours(commits, &stats);\n        if ignore_bots && estimate.name.contains_str(b\"[bot]\") {\n            ignored_bot_commits += estimate.num_commits;\n            return;\n        }\n        results_by_hours.push(estimate);\n    };\n    for (idx, (_, elm)) in commit_authors.iter().enumerate() {\n        if elm.email != *current_email {\n            push_estimate(&commit_authors[slice_start..idx]);","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/hours/mod.rs#L283-L319","documentation":"This error is thrown by the `hours` command (contributor activity histogram) in gitoxide-core when, after reading and filtering commits, no commits remain to process. The command cannot compute per-hour statistics from an empty set, so it aborts early with a bail! instead of producing empty output.","triggerScenarios":"Calling the `gix hours` CLI (gitoxide-core::hours::estimate) against a repository or commit range that yields zero commits - e.g. an empty repository, a revision range with no commits, or filters (authors/dates) excluding every commit.","commonSituations":"Running the hours analysis on a freshly initialized repo with no commits; specifying a branch or range that is empty; typos in revision arguments that resolve to nothing; passing date filters that exclude all commits.","solutions":["Verify the repository actually has commits (git log / gix log) before running the hours command","Check the revision or range arguments resolve to at least one commit","Remove author/date filters that exclude all commits","Guard the caller: count commits first and skip the hours computation when the set is empty"],"exampleFix":"// before\ngix hours --range nonexistent..main repo/\n// after\ngit rev-list --count nonexistent..main  # confirm range has commits first\ngix hours --range main repo/","handlingStrategy":"validation","validationCode":"// Rust: ensure the commit set is non-empty before calling hours estimation\nlet commits: Vec<_> = collect_commits(repo, range)?;\nif commits.is_empty() {\n    eprintln!(\"Skipping hours analysis: no commits in range\");\n    return Ok(()); // or return a user-friendly error\n}\nhours::estimate(commits, /* ... */)?;","typeGuard":null,"tryCatchPattern":"match hours::estimate(/* ... */) {\n    Ok(result) => /* use result */,\n    Err(e) if e.to_string().contains(\"No commits to process\") => /* skip or report empty input */,\n    Err(e) => return Err(e),\n}","preventionTips":["Verify the repository has at least one commit before analysis","Validate revision ranges resolve to commits with rev-list first","Review author/date filters so they cannot exclude everything"],"tags":["git","empty-input","cli","statistics"],"backgroundTag":"empty-result-set","analyzedSha":"e73179060badf27222d790981fac3f84c1830a7e","analyzedAt":"2026-09-08T11:26:50.865Z","contentChangedAt":"2026-09-08T11:26:50.865Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}