"Changes since your last review filter" needs to ignore merge commits #13727

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

Originally created by @LondonRain on GitHub (Nov 19, 2024).

Description

The "changes since your last review filter" also shows merge commits, where I updated my feature PR branch from the base branch. Those changes would not be shown when looking at all commits of the PR as they are not different to the base branch. The commit filter needs to ignore merge commits.

Gitea Version

1.22.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Debian

How are you running Gitea?

Binary

Database

MySQL/MariaDB

Originally created by @LondonRain on GitHub (Nov 19, 2024). ### Description The "changes since your last review filter" also shows merge commits, where I updated my feature PR branch from the base branch. Those changes would not be shown when looking at all commits of the PR as they are not different to the base branch. The commit filter needs to ignore merge commits. ### Gitea Version 1.22.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Debian ### How are you running Gitea? Binary ### Database MySQL/MariaDB
GiteaMirror added the topic/prtype/bug labels 2025-11-02 10:51:32 -06:00
Author
Owner

@delvh commented on GitHub (Nov 19, 2024):

Do you happen to know the correct argument to git for it?
At the moment, we use git diff-tree --name-only --root --no-commit-id -r -z $BASE $HEAD to get the changed files between the two commits.
It will either be as simple as adding the correct argument to it, or it will be (basically) impossible.

Is that even the part you mean?
From your description, I'm not quite sure exactly what you're asking for:
Are you asking for

  • not showing file changes in merge commits that changed in no other commit inbetween?
  • not showing the Only show changes since the last review comparison button when the base commit is a merge commit?
  • something else?
@delvh commented on GitHub (Nov 19, 2024): Do you happen to know the correct argument to git for it? At the moment, we use `git diff-tree --name-only --root --no-commit-id -r -z $BASE $HEAD` to get the changed files between the two commits. It will either be as simple as adding the correct argument to it, or it will be (basically) impossible. Is that even the part you mean? From your description, I'm not quite sure exactly what you're asking for: Are you asking for - not showing file changes in merge commits that changed in no other commit inbetween? - not showing the `Only show changes since the last review` comparison button when the base commit is a merge commit? - something else?
Author
Owner

@LondonRain commented on GitHub (Jan 6, 2025):

It's not about the general diff view on a PR but within the commit filter

This had two commits since my last review of which one was a merge commit to update the PR branch from its base branch.
filter1
filter2

Selecting the "Show changes since your last review" option than produces a diff where it includes ALL the changes from the merge commit, despite the files being identical on source and target branch. This makes the function pretty useless.

@LondonRain commented on GitHub (Jan 6, 2025): It's not about the general diff view on a PR but within the commit filter This had two commits since my last review of which one was a merge commit to update the PR branch from its base branch. ![filter1](https://github.com/user-attachments/assets/84a155f4-6339-4313-a42c-c78ff2e181de) ![filter2](https://github.com/user-attachments/assets/e80f1d83-593e-49a2-978e-88e7a04d3c1f) Selecting the "Show changes since your last review" option than produces a diff where it includes ALL the changes from the merge commit, despite the files being identical on source and target branch. This makes the function pretty useless.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13727