Skip to content

Deleting a forked repos does not decrement number of forks

Summary

I created a fork as a backup of a repository before I used the nuclear option.
After my repository reworking was successful, I deleted the fork.

GitLab still shows one fork for my repository, but the list of forks is empty.

Steps to reproduce

  1. Create a repo with dummy data.
  2. fork that repo
  3. delete the forked repo as you would delete a normal repo
  4. go to the original repo
  • it still displays 1 fork
  • listing all forks shows an empty list

Example Project

Original repo: https://gitlab.com/paebbels/bugreport-1
Fork (deleted): https://gitlab.com/OSVG/bugreport-1

See Screen 1 (below) which shows one fork.

Screen 2 (below) shows the list of forks is empty.

What is the current bug behavior?

The number of forks doesn't decrement after a fork gets deleted.

What is the expected correct behavior?

Decrement the number of forks if a fork gets deleted.

Relevant logs and/or screenshots

Screen 1:
image

Screen 2:
image

Output of checks

This bug happend on GitLab.com and GitLab-EE on my local installation. Latest GitLab version 10.6.3-ee.

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:env:info)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Edited by Patrick Lehmann