Skip to content

Fix repository cache invalidation issue when project is recreated with an empty repo

Stan Hu requested to merge stanhu/gitlab-ce:fix-stale-branch-count-cache into master

To reproduce:

  1. Create a project with some content
  2. Rename the project
  3. Create a new project with the same name.
  4. Boom - 404.

After step 2, the branch and tag counts were not being cleared. This would cause repository.has_visible_content? to erroneously return true for the newly-created project.

Please review if this change has significant performance implications.

Closes #13384 (closed)

Merge request reports