-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Deleted branch still visible in branch list and 404 on access #31018
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
Thanks for the bug report! When you delete a branch, we do keep it around in the DB until this cron job goes ahead and removes it and any other deleted branches. From reading the associated code it looks like it is done every midnight for branches that were deleted at least a day ago. |
From looking around a bit further, you can even configure this particular cron task, see here for more details. For some reason I can't find it in the web documentation so I may file an issue for that. |
Created #31022 to add web docs for deleted branch cleanup. Let me know if you have any further questions. |
We can remove the link of the branch name. |
Thanks for your fast response. The cron task for this job was disabled. The issue is now solved. |
From #31018 (comment). This commit removes the link to a deleted branch name because it returns a 404 while it is in this deleted state. GitHub also throws a 404 when navigating to a branch link that was just deleted, but this deleted branch is removed from the branch list after a page refresh. Since with Gitea this deleted branch would be kept around for quite some time (well, until the "cleanup deleted branches" cron job begins), it makes sense to not have this as a link that users can navigate to.
…31028) From go-gitea#31018 (comment). This commit removes the link to a deleted branch name because it returns a 404 while it is in this deleted state. GitHub also throws a 404 when navigating to a branch link that was just deleted, but this deleted branch is removed from the branch list after a page refresh. Since with Gitea this deleted branch would be kept around for quite some time (well, until the "cleanup deleted branches" cron job begins), it makes sense to not have this as a link that users can navigate to.
…31032) Backport #31028 by @kemzeb From #31018 (comment). This commit removes the link to a deleted branch name because it returns a 404 while it is in this deleted state. GitHub also throws a 404 when navigating to a branch link that was just deleted, but this deleted branch is removed from the branch list after a page refresh. Since with Gitea this deleted branch would be kept around for quite some time (well, until the "cleanup deleted branches" cron job begins), it makes sense to not have this as a link that users can navigate to. Co-authored-by: Kemal Zebari <[email protected]>
From go-gitea/gitea#31018 (comment). This commit removes the link to a deleted branch name because it returns a 404 while it is in this deleted state. GitHub also throws a 404 when navigating to a branch link that was just deleted, but this deleted branch is removed from the branch list after a page refresh. Since with Gitea this deleted branch would be kept around for quite some time (well, until the "cleanup deleted branches" cron job begins), it makes sense to not have this as a link that users can navigate to. (cherry picked from commit 1007ce764ea80b48120b796175d7d1210cbb6f74)
Description
When I delete a branch by web interface or by 'git push' the branch is listed as deleted within the repo branch overview. Following the branch link I get a 404 error. Is this behaviour intended ? Note that after a 'restore' the branch is accessible again. How can I remove a deleted branch completely ?
Note: try.gitea.io is currently not accessible ?!
Gitea Version
1.21.11
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
Git Version
2.40.1
Operating System
Ubuntu 22.04.4
How are you running Gitea?
Docker image:
https://hub.docker.com/layers/gitea/gitea/1.21.11/images/sha256-0abba6432e37944cd13b47aa0c6ffb958e1a22d7b3795c723267ac92163b774f?context=explore
Database
MySQL/MariaDB
The text was updated successfully, but these errors were encountered: