refs/pull/##/head is not updated after a Rebase and merge #2278

Closed
opened 2025-11-02 04:30:51 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @InExtremaRes on GitHub (Aug 31, 2018).

  • Gitea version (or commit ref): b9ae16d

(using Gitea in Docker with image of Id: "sha256:73bd5621a03339e79b4ef48392aeb68be5eedff40c068763f0d7f73f866a233c")

Description

When a PR is merged using Rebase and merge, commits are rebased but the branch and ref to the PR (refs/pull/#/head) is not updated but left behind in previous commit. I don't know if this will also happen with #4052.

If I update the branch manually (via rebase or reset, and push --force) the branch is updated but the PR and the ref is not. I assume because the PR is closed after merging.

Edit

I was recently trying the same in github (there is no commit graph AFAIK but I pull directly with git fetch remote pull/n/head:local) and the ref is also not updated after the Rebase and merge. So I think this is expected behaviour? In that case, can someone explain me (or point to a doc) why?

Screenshots

Here you can see how the ref and branch is left behind after the Rebase and merge (take attention to the commit with message fix spell)

before merge

image

Originally created by @InExtremaRes on GitHub (Aug 31, 2018). - Gitea version (or commit ref): b9ae16d (using Gitea in Docker with image of Id: "sha256:73bd5621a03339e79b4ef48392aeb68be5eedff40c068763f0d7f73f866a233c") - Can you reproduce the bug at https://try.gitea.io: - [x] Yes https://try.gitea.io/inextremares/testing/graph - [ ] No - [ ] Not relevant ## Description When a PR is merged using Rebase and merge, commits are rebased but the branch and ref to the PR (`refs/pull/#/head`) is **not** updated but left behind in previous commit. I don't know if this will also happen with #4052. If I update the branch manually (via rebase or reset, and push --force) the branch is updated but the PR and the ref is not. I assume because the PR is closed after merging. ## Edit I was recently trying the same in github (there is no _commit graph_ AFAIK but I pull directly with `git fetch remote pull/n/head:local`) and the ref is also not updated after the Rebase and merge. So I think this is expected behaviour? In that case, can someone explain me (or point to a doc) why? ## Screenshots Here you can see how the ref and branch is left behind after the Rebase and merge (take attention to the commit with message _fix spell_) ![before merge](https://user-images.githubusercontent.com/1635491/44914726-70952900-ad07-11e8-8ef2-497f07f576f3.png) ![image](https://user-images.githubusercontent.com/1635491/44914868-ccf84880-ad07-11e8-9c71-25c3b60f75e9.png)
GiteaMirror added the type/enhancementissue/stale labels 2025-11-02 04:30:51 -06:00
Author
Owner

@stale[bot] commented on GitHub (Jan 11, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jan 11, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Feb 21, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Feb 21, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2278