You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have recently deleted one of my repositories, and browsed through the database to check if the removal was successful. I have found that the count for the tags that repository was associated with have not been decreased. Further, although the tags were only used for this single repository, the tags were still in the database.
By having a look at the code, it seems that the function removeTopicFromRepo() from /models/topic.go is never called, and hence the RepoCount remains unchanged after a repository is deleted. I believe that when deleting a repository in DeleteRepository() from /models/repo.go, the function should be called for every tag that repository is associated with.
I'd like to work on a pull request to resolve this issue, but I first wanted to confirm that this is indeed a bug. Also, I'm unsure whether to delete a tag if it has a count of 0, or to leave it in the database.
Lastly, if this was a bug, all current databases must be regarded as inconsistent. Should we reevaluate the counts for the tags?
The text was updated successfully, but these errors were encountered:
Description
Hello,
I have recently deleted one of my repositories, and browsed through the database to check if the removal was successful. I have found that the count for the tags that repository was associated with have not been decreased. Further, although the tags were only used for this single repository, the tags were still in the database.
By having a look at the code, it seems that the function
removeTopicFromRepo()
from/models/topic.go
is never called, and hence theRepoCount
remains unchanged after a repository is deleted. I believe that when deleting a repository inDeleteRepository()
from/models/repo.go
, the function should be called for every tag that repository is associated with.I'd like to work on a pull request to resolve this issue, but I first wanted to confirm that this is indeed a bug. Also, I'm unsure whether to delete a tag if it has a count of
0
, or to leave it in the database.Lastly, if this was a bug, all current databases must be regarded as inconsistent. Should we reevaluate the counts for the tags?
The text was updated successfully, but these errors were encountered: