Option to show only the first parent commit in the GitLab commit view page
Proposal
Add an option to show only the first parent commit in the GitLab commits list page. The option should be a checkbox that allows users to choose whether to display only the first parent commit or all parents of the commits in the current branch (like in --first-parent option of git.
The checkbox's default value should be configurable in the project settings.
When the "Show only first parent commits" option is selected, the page should also clearly indicate that only the first parent commits are being shown, to avoid confusion and errors.
Explanation
The idea is to see the list of commits like in the command git log --oneline --first-parent
.
This will remove the intenal commits from the list. Turning this:
This is very noticeable when working with larger branches than what is shown in this repository, and allows the user to be more free within their branches without them thinking on "polluting" the commit list of the main branch - in the visualization.
Implementation steps
We already have a support for first_parent
option on Gitaly side and expose this parameter via REST API.
We can extend a list of options with first_parent: true
parameter based on user's preferences.