Feature Request: Support --first-parent filtering in GitHub compare view
#192924
Replies: 1 comment
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Product Feedback
💬 Feature/Topic Area
Other
Body
The problem
GitHub's compare view (
/compare/A...B) counts all commits reachable in the Git DAG, including commits from merged feature branches. This makes the compare view unusable for commit-range-based tooling when even a single PR in the range was merged without squashing.Our use case
We maintain a performance regression tracking tool (dotnet/perf-autofiling-issues) that automatically files issues when benchmark regressions are detected in dotnet/runtime. Each regression issue includes a commit range (start SHA → end SHA) identifying the window where the regression was introduced. We link to GitHub's compare view so developers can quickly see which PRs landed in that window and narrow down the culprit.
Real-world example
d9cb3f3a(Apr 14, 2026)62fda127(Apr 15, 2026)The cause: one PR in that range (#126276 — "Add sources from iltrim hackathon") was merged as a true merge commit (not squash-merged), bringing in ~119 individual commits from its feature branch. Those branch commits are reachable in the DAG and get included in the compare view, even though they are not part of the main branch's linear history.
This makes the compare link useless for our regression investigation workflow — developers see 141 commits spanning 3 weeks instead of the 22 relevant main-branch commits from the last 14 hours.
Why existing workarounds don't work
git log --first-parentlocally/repos/.../commits?since=...&until=.../commits/main/?since=...&until=...)A..B)What we'd like
A way to view the first-parent-only commit history between two SHAs in the GitHub compare UI. This could be:
/compare/A...B?first-parent=trueAny of these would make the compare view usable for commit-range-based tooling in repos with mixed merge strategies.
Impact
This affects any project that:
For dotnet/runtime specifically, the perf regression tracker generates dozens of issues per week, each with a compare link. A single non-squashed merge in the range makes every one of those links misleading.
Prior discussions (closed/dormant)
This has been requested before but never gained traction:
Beta Was this translation helpful? Give feedback.
All reactions