Conversation
Co-authored-by: kylewrader <kylewrader@gmail.com>
|
Cursor Agent can help with this pull request. Just |
Co-authored-by: kylewrader <kylewrader@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| if options.first_parent { | ||
| git_args.push("--first-parent".to_string()); | ||
| } | ||
| git_args.push("--pretty=format:%ct%x09%an%x09%ae".to_string()); |
There was a problem hiding this comment.
Per-author activity stats assume chronological ordering that no longer holds
Medium Severity
The per-author timestamp tracking at lines 325-328 relies on commits arriving in reverse-chronological order (as documented in the comments at lines 318 and 322-324). With --first-parent, this was guaranteed. Without it, git log uses topological ordering where commits from merged branches may not appear in strict date order. This causes latest_commit_ts_by_author and oldest_commit_ts_by_author to potentially hold swapped or incorrect values, leading to wrong "commits per week" rates and "active span" displays. When latest_ts < oldest_ts, saturating_sub returns 0, artificially inflating the rate calculation.


Remove
--first-parentfromrepo statsto include all history reachable from HEAD.The previous implementation only considered the first parent history, which could omit relevant contributions from merged branches. This change ensures that
repo statsprovides a comprehensive view of all work landed in the repository.Note
Low Risk
Small, localized change to a reporting-only command; primary risk is altered stats output/perf on very large repos when not using
--first-parent.Overview
repo statsnow analyzes all commits reachable fromHEADby default (instead of always using--first-parent), with a new--first-parentflag to opt back into the previous behavior.Docs/help text were updated accordingly, and the empty-result message now distinguishes between “no commits” vs “no first-parent commits”. The crate version was bumped to
1.9.0.Written by Cursor Bugbot for commit dc11c26. This will update automatically on new commits. Configure here.