PRs should ignore merge commits #12933

Open
opened 2025-11-02 10:25:32 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @TheFriendlyCoder on GitHub (Apr 29, 2024).

Feature Description

When a new PR gets created and the source branch matches the commit history of the target branch exactly with the exception of a merge commit, the web UI warns you the the source branch is out of date. While this is, strictly speaking, accurate, merge commits don’t actually contain any source code changes and so this warning can be ignored. However, if there are actual code commits on the target branch then it may not be safe to ignore this warning. Without doing a full comparison between the branches it is impossible to know for sure. This creates unnecessary confusion for users.

I am pretty sure other git repository tools like GitHub and Gitlab exclude merge commits when doing history comparisons to avoid this problem.

This issue is particularly problematic for developers that regularly stack commits across multiple PRs because every PR after the first will inherit this branch out of date warning

Screenshots

No response

Originally created by @TheFriendlyCoder on GitHub (Apr 29, 2024). ### Feature Description When a new PR gets created and the source branch matches the commit history of the target branch exactly with the exception of a merge commit, the web UI warns you the the source branch is out of date. While this is, strictly speaking, accurate, merge commits don’t actually contain any source code changes and so this warning can be ignored. However, if there are actual code commits on the target branch then it may not be safe to ignore this warning. Without doing a full comparison between the branches it is impossible to know for sure. This creates unnecessary confusion for users. I am pretty sure other git repository tools like GitHub and Gitlab exclude merge commits when doing history comparisons to avoid this problem. This issue is particularly problematic for developers that regularly stack commits across multiple PRs because every PR after the first will inherit this branch out of date warning ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 10:25:32 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12933