PR with updated mirror results in equal branches #7813

Closed
opened 2025-11-02 07:37:31 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @sshaikh on GitHub (Sep 7, 2021).

  • Gitea version (or commit ref): 1.14.2
  • Git version: 2.20.1
  • Operating system: Debian Buster
  • Database (use [x]):
    • [X ] PostgreSQL
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No - cannot fork repos already owned
  • Log gist:
    Nothing above standard SQL queries

Description

To reproduce:

  1. Create repo in migratable service (eg github)

  2. Migrate to Gitea, checking "mirror" option

  3. Fork mirror, and make a few commits

  4. Make a few commits to mirror upstream (ie on github)

  5. Force or wait for gitea to sync the mirror. Confirm that the fork is ahead of mirror and mirror is ahead of fork.

  6. On fork, attempt to create a new PR (merge into fork, pull from mirror): eg http://gitea/user/test-repo/compare/master...mirror-org/test-repo:master

  7. Gitea claims that the branches are equal and will not pull in the new commits on mirror.

Originally created by @sshaikh on GitHub (Sep 7, 2021). - Gitea version (or commit ref): 1.14.2 - Git version: 2.20.1 - Operating system: Debian Buster - Database (use `[x]`): - [X ] PostgreSQL - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [X] No - cannot fork repos already owned - Log gist: Nothing above standard SQL queries ## Description To reproduce: 1. Create repo in migratable service (eg github) 2. Migrate to Gitea, checking "mirror" option 3. Fork mirror, and make a few commits 4. Make a few commits to mirror upstream (ie on github) 5. Force or wait for gitea to sync the mirror. Confirm that the fork is ahead of mirror and mirror is ahead of fork. 6. On fork, attempt to create a new PR (merge into fork, pull from mirror): eg http://gitea/user/test-repo/compare/master...mirror-org/test-repo:master 7. Gitea claims that the branches are equal and will not pull in the new commits on mirror.
GiteaMirror added the issue/needs-feedback label 2025-11-02 07:37:31 -06:00
Author
Owner

@SBado commented on GitHub (Jan 11, 2022):

@sshaikh This happens if the branch you are trying to merge into has the same name of the branch you are trying to pull from.

Branches with same name:

merge into: Fork:master
pull from: Mirror:master

Result: "These branches are equal. There is no need to create a pull request."

Branches with different name:

merge into: Fork:mybranch
pull from: Mirror:master

Result: since I have no commits to merge right now, the message changed to "These branches are equal. This PR will be empty". However, the "New pull request" button is now visible, so it should work now.

@SBado commented on GitHub (Jan 11, 2022): @sshaikh This happens if the branch you are trying to merge into has the same name of the branch you are trying to pull from. **Branches with same name:** > merge into: Fork:master > pull from: Mirror:master Result: _"These branches are equal. There is no need to create a pull request."_ **Branches with different name:** > merge into: Fork:mybranch > pull from: Mirror:master Result: since I have no commits to merge right now, the message changed to _"These branches are equal. This PR will be empty"_. However, the _"New pull request"_ button is now visible, so it should work now.
Author
Owner

@sshaikh commented on GitHub (Jan 11, 2022):

Thank you for the explanation. To clarify though, are we staying that this is by design? As I think this is quite a reasonable workflow.

@sshaikh commented on GitHub (Jan 11, 2022): Thank you for the explanation. To clarify though, are we staying that this is by design? As I think this is quite a reasonable workflow.
Author
Owner

@lunny commented on GitHub (Jan 12, 2022):

Could you create an org in https://try.gitea.io and mirror to there and fork to your individual account?

@lunny commented on GitHub (Jan 12, 2022): Could you create an org in https://try.gitea.io and mirror to there and fork to your individual account?
Author
Owner

@SBado commented on GitHub (Jan 17, 2022):

@lunny I can try. How do I create an organization on the test instance?

@SBado commented on GitHub (Jan 17, 2022): @lunny I can try. How do I create an organization on the test instance?
Author
Owner

@wxiaoguang commented on GitHub (Mar 29, 2023):

@lunny I can try. How do I create an organization on the test instance?

That "test instance" doesn't support creating organizations .....

I guess this issue is not clearly resolved?

@wxiaoguang commented on GitHub (Mar 29, 2023): > @lunny I can try. How do I create an organization on the test instance? That "test instance" doesn't support creating organizations ..... I guess this issue is not clearly resolved?
Author
Owner

@lunny commented on GitHub (Mar 29, 2023):

@SBado maybe I can create an org for you if you can tell me your test user name there.

@lunny commented on GitHub (Mar 29, 2023): @SBado maybe I can create an org for you if you can tell me your test user name there.
Author
Owner

@GiteaBot commented on GitHub (Sep 8, 2023):

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

@GiteaBot commented on GitHub (Sep 8, 2023): 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#7813