No difference shown when merging request #14763

Closed
opened 2025-11-02 11:22:20 -06:00 by GiteaMirror · 12 comments
Owner

Originally created by @SantoMozzarella on GitHub (Jul 15, 2025).

Description

Problem:

  1. There are two repositories:
  • A shared/original repository (myorg/repo)
  • My personal fork (myuser/repo), created from the shared one.
  1. I made changes in my fork and pushed them to a feature branch.

  2. I attempted to create a pull request from my fork into the original repository.

  3. However, Gitea shows "nothing to compare" - as if there are no differences - even though the changes do exist.

Try to resolve:

  1. I upgraded to version 1.24.3 (from 1.23), but the issue still persists.

  2. From my observations, Gitea attempts to compare my fork with itself (fork vs fork), even when I explicitly select the original repository (myorg/repo) as the target during pull request creation.

  3. I verified using Git on the command line:

  • I compared my pushed changes to the upstream repository (the original repo).
  • The changes are present, and the diff is real.
  • git diff upstream/main..HEAD confirms the difference.
  1. I enabled debug logging in app.ini, but when triggering the pull request creation, the logs only show an HTTP 200 OK response.
    It seems that Gitea is not comparing the fork against the original repository, but instead compares the fork with itself (fork vs fork) - despite the correct base repository being selected in the UI.

Additionally: docker exec gitea gitea doctor --all

Screenshots

Image Diff problem Image Show push in my local repo

Gitea Version

1.24.3

Can you reproduce the bug on the Gitea demo site?

No

Operating System

Docker container from docker hub (gitea/gitea:1.24.3)

Browser Version

Firefox 140.0.4 (64-bit)

Originally created by @SantoMozzarella on GitHub (Jul 15, 2025). ### Description Problem: 1. There are two repositories: - A shared/original repository (myorg/repo) - My personal fork (myuser/repo), created from the shared one. 2. I made changes in my fork and pushed them to a feature branch. 3. I attempted to create a pull request from my fork into the original repository. 4. However, Gitea shows "nothing to compare" - as if there are no differences - even though the changes do exist. Try to resolve: 1. I upgraded to version 1.24.3 (from 1.23), but the issue still persists. 2. From my observations, Gitea attempts to compare my fork with itself (fork vs fork), even when I explicitly select the original repository (myorg/repo) as the target during pull request creation. 3. I verified using Git on the command line: - I compared my pushed changes to the upstream repository (the original repo). - The changes are present, and the diff is real. - git diff upstream/main..HEAD confirms the difference. 4. I enabled debug logging in app.ini, but when triggering the pull request creation, the logs only show an HTTP 200 OK response. It seems that Gitea is not comparing the fork against the original repository, but instead compares the fork with itself (fork vs fork) - despite the correct base repository being selected in the UI. Additionally: `docker exec gitea gitea doctor --all` ### Screenshots <img width="1164" height="556" alt="Image" src="https://github.com/user-attachments/assets/a7ab16c4-01ac-408c-aa22-033e43063a72" /> Diff problem <img width="1389" height="617" alt="Image" src="https://github.com/user-attachments/assets/176ea413-81c7-4444-8537-8509bbe766a8" /> Show push in my local repo ### Gitea Version 1.24.3 ### Can you reproduce the bug on the Gitea demo site? No ### Operating System Docker container from docker hub (gitea/gitea:1.24.3) ### Browser Version Firefox 140.0.4 (64-bit)
GiteaMirror added the topic/uitype/bugissue/needs-feedback labels 2025-11-02 11:22:20 -06:00
Author
Owner

@SantoMozzarella commented on GitHub (Jul 15, 2025):

I set up a test container instance, and recreating the shared repository solved the problem there.
However, this issue has occurred three times already, and I cannot recreate the shared repository in production.

Also, the problem does not affect all users - some can commit to the shared repository.

@SantoMozzarella commented on GitHub (Jul 15, 2025): I set up a test container instance, and recreating the shared repository solved the problem there. However, this issue has occurred three times already, and I cannot recreate the shared repository in production. Also, the problem does not affect all users - some can commit to the shared repository.
Author
Owner

@wxiaoguang commented on GitHub (Jul 15, 2025):

Can you try these two fixes?

Image
@wxiaoguang commented on GitHub (Jul 15, 2025): Can you try these two fixes? <details> <img width="1890" height="1420" alt="Image" src="https://github.com/user-attachments/assets/2887543e-9551-480d-87f5-fa5af62f645c" /> </details>
Author
Owner

@wxiaoguang commented on GitHub (Jul 15, 2025):

Another question, what is that commit ID for? The base repo's master, or the fork repo's master?

Image
@wxiaoguang commented on GitHub (Jul 15, 2025): Another question, what is that commit ID for? The base repo's master, or the fork repo's master? <img width="1166" height="250" alt="Image" src="https://github.com/user-attachments/assets/234be393-9a23-4406-98da-cbdc2edcdad0" />
Author
Owner

@SantoMozzarella commented on GitHub (Jul 15, 2025):

Can you try these two fixes?

Hi.

Yes, I tried that, and I also ran: docker exec gitea gitea doctor --all

But it didn't resolve the issue.

@SantoMozzarella commented on GitHub (Jul 15, 2025): > Can you try these two fixes? Hi. Yes, I tried that, and I also ran: `docker exec gitea gitea doctor --all` But it didn't resolve the issue.
Author
Owner

@SantoMozzarella commented on GitHub (Jul 15, 2025):

Another question, what is that commit ID for? The base repo's master, or the fork repo's master?

These are the latest commit ID in both repositories.
For some reason, they are identical, even though the shared repository doesn't have that commit yet (a378aa66c0).

The first ID - latest commit in share repository.
The second ID - latest commit in my forked repository.

'Share Repo' <<----pull request-- 'Forked Repo'

@SantoMozzarella commented on GitHub (Jul 15, 2025): > Another question, what is that commit ID for? The base repo's master, or the fork repo's master? These are the latest commit ID in both repositories. For some reason, they are identical, even though the shared repository doesn't have that commit yet (a378aa66c0). The first ID - latest commit in share repository. The second ID - latest commit in my forked repository. `'Share Repo' <<----pull request-- 'Forked Repo'`
Author
Owner

@SantoMozzarella commented on GitHub (Jul 15, 2025):

If I manually create a link to compare the latest commit from share repository with my forked master branch, it suddenly detects the differences.

Example link where the latest commit from the shared repository is compared with the forked one:
https://git-example.org/WayneIndustries/framework/compare/78d8c048...ige/framework:master

Image Image
@SantoMozzarella commented on GitHub (Jul 15, 2025): If I manually create a link to compare the latest commit from share repository with my forked master branch, it suddenly detects the differences. Example link where the latest commit from the shared repository is compared with the forked one: `https://git-example.org/WayneIndustries/framework/compare/78d8c048...ige/framework:master` <img width="1822" height="811" alt="Image" src="https://github.com/user-attachments/assets/d5d5329c-2209-41b2-8586-45a089eb8565" /> <img width="524" height="461" alt="Image" src="https://github.com/user-attachments/assets/26915061-2155-4651-90b1-90fb2c517aba" />
Author
Owner

@SantoMozzarella commented on GitHub (Jul 15, 2025):

I created the PR using tea (https://gitea.com/gitea/tea).
It seems to be a bug on the frontend side.

@SantoMozzarella commented on GitHub (Jul 15, 2025): I created the PR using tea (https://gitea.com/gitea/tea). It seems to be a bug on the frontend side.
Author
Owner

@wxiaoguang commented on GitHub (Jul 16, 2025):

I created the PR using tea (https://gitea.com/gitea/tea). It seems to be a bug on the frontend side.

Good point! So it is reproducible by using tea cli?

@wxiaoguang commented on GitHub (Jul 16, 2025): > I created the PR using tea (https://gitea.com/gitea/tea). It seems to be a bug on the frontend side. Good point! So it is reproducible by using `tea` cli?
Author
Owner

@SantoMozzarella commented on GitHub (Jul 16, 2025):

Good point! So it is reproducible by using tea cli?

Yes, but the comparison also doesn't happen in the Web UI.

@SantoMozzarella commented on GitHub (Jul 16, 2025): > Good point! So it is reproducible by using `tea` cli? Yes, but the comparison also doesn't happen in the Web UI.
Author
Owner

@wxiaoguang commented on GitHub (Jul 16, 2025):

IIRC tea cli uses API, I am not able to reproduce:

 curl -X 'POST' \
  'http://localhost:3000/api/v1/repos/root/test-btn/pulls' \
  -H 'accept: application/json' \
  -H 'authorization: bearer xxxxxxxxxxxxxxxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{"base":"main","head":"orgprivate:branch-for-base","title":"test pr"}'

Can you provide the reproducible steps?

@wxiaoguang commented on GitHub (Jul 16, 2025): IIRC `tea` cli uses API, I am not able to reproduce: ``` curl -X 'POST' \ 'http://localhost:3000/api/v1/repos/root/test-btn/pulls' \ -H 'accept: application/json' \ -H 'authorization: bearer xxxxxxxxxxxxxxxxxxxxxx' \ -H 'Content-Type: application/json' \ -d '{"base":"main","head":"orgprivate:branch-for-base","title":"test pr"}' ``` ---- Can you provide the reproducible steps?
Author
Owner

@SantoMozzarella commented on GitHub (Jul 21, 2025):

Image

Nothing.

@SantoMozzarella commented on GitHub (Jul 21, 2025): <img width="1111" height="432" alt="Image" src="https://github.com/user-attachments/assets/7536a8e4-d2f1-4161-a098-ff57f6a1b93b" /> Nothing.
Author
Owner

@GiteaBot commented on GitHub (Aug 20, 2025):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (Aug 20, 2025): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14763