Skip to content

Sum hoc only for single-parent commits in total_commits_pushed - #670

Open
Thayorns wants to merge 3 commits into
zerocracy:masterfrom
Thayorns:659
Open

Sum hoc only for single-parent commits in total_commits_pushed#670
Thayorns wants to merge 3 commits into
zerocracy:masterfrom
Thayorns:659

Conversation

@Thayorns

@Thayorns Thayorns commented Sep 2, 2026

Copy link
Copy Markdown

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

@Thayorns

Thayorns commented Sep 2, 2026

Copy link
Copy Markdown
Author

@yegor256 could you take a look, happy to clarify anything about the fix.

yegor256 commented Sep 3, 2026

Copy link
Copy Markdown
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

@Thayorns

Thayorns commented Sep 3, 2026

Copy link
Copy Markdown
Author

@yegor256 take a look please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

total_commits_pushed counts merge commits twice in lib/fbe/github_graph.rb

2 participants