Sum hoc only for single-parent commits in total_commits_pushed - #670
Open
Thayorns wants to merge 3 commits into
Open
Sum hoc only for single-parent commits in total_commits_pushed#670Thayorns wants to merge 3 commits into
Thayorns wants to merge 3 commits into
Conversation
Author
|
@yegor256 could you take a look, happy to clarify anything about the fix. |
Member
|
This PR now has merge conflicts and needs a rebase before it can go in. Assigning to @yegor256 for a look. Generated by Claude Code |
This was referenced Sep 3, 2026
yegor256
self-requested a review
September 3, 2026 06:21
Author
|
@yegor256 take a look please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The history query in total_commits_pushed already fetches parents.totalCount for every commit but never used it, so a merge commit's additions and deletions were added on top of the additions and deletions of every commit it brought in through history, inflating the hoc count by roughly the size of each merged branch.
This filters the sum to commits with exactly one parent, using the field the query already pays for, and locks the fixed behavior down with a test where a page of pure merge commits contributes nothing to hoc.
Closes #659