-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Gitea does not clean up old reverences on branch delete #9201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello, I installed the milestone 1.10.2 that should fix this problem but it appears that nothing has changed for it (or i do not understand). Once again i will describe my issue : I have two branches, master and develop. I push some code on my develop branch, create a pull request and merge it into master (with "squash and merge" option). Once it's done, i remove the develop branch with gitea (branch > trash icon). Branch is marked as deleted by me. In local, i follow theses steps:
And when i have done this, Gitea keeps a reference on the pull request that have been merged (as you can see on the screenshot). Is it the expected behaviour by the patched milestone ? |
@Tchoupinax can you reopen this issue? |
I can't. :/ |
I've reopened but I still don't understand the problem - probably because I've not read the issue completely. |
This comment has been minimized.
This comment has been minimized.
@zeripath I can confirm the bug: if you merge a branch into master, delete the branch and add a new branch with the same name gitea think it is the same branch and on the repo-branch-view the old PR is reverenced This happen because gitea determine the source branch of a PR by repo and branch name To fix this the repo-branch-view only should show merged with reference if merged_commit_id or one of the merged_commit_id.parent (should only exist two) is equal with commitID of the current branch |
Dont know what the correct title of THIS issue should look like ... |
@6543 Thank you for reproducing and confirming the bug ;) |
Once a branch has been merged if the commit ID no longer equals that of the merge commit id don't offer to delete the branch on the pull screen and don't list it as merged on branches. Fix go-gitea#9201
Ah I've been able to repeat this on the branches view. I've fixed another issue - if the branch has moved on from the MergeCommitID we shouldn't offer to delete it either. Nope I haven't fixed this... See below |
The problem here is that the MergeCommitID isn't the actual head - I need to use a different ID... |
OK I've come up with a solution but it's very inefficient and it needs to be improved. The branches page likely needs some pagination too. |
@lafriks can you move this to 1.10.3 pleace |
…a#9614) Once a branch has been merged if the commit ID no longer equals that of the pulls ref commit id don't offer to delete the branch on the pull screen and don't list it as merged on branches. Fix go-gitea#9201 When looking at the pull page we should also get the commits from the refs/pulls/x/head Fix go-gitea#9158
…9639) Once a branch has been merged if the commit ID no longer equals that of the pulls ref commit id don't offer to delete the branch on the pull screen and don't list it as merged on branches. Fix #9201 When looking at the pull page we should also get the commits from the refs/pulls/x/head Fix #9158
[x]
):Description
Hello,
Following a Discord discussion, i create this issue about deleted branches. Sometimes i meet issues when i delete my
develop
branch and repush an other branch also nameddevelop
.My global issue :
When i want to show branches :
@6543 advises me to create this issue to collect data and scenario about this problem. I think there is a "global" issue when you delete and recreate same naming branch.
I can not reproduce the issue on try.gitea.io, deleted branches are not kept... It is because of the public instance or the 1.11 version ?
Update will coming :)
The text was updated successfully, but these errors were encountered: