Support multiple forks within the same namespace
Proposal
When forking a project, ask if the user wants to create a new fork or be redirected to an existing one.
Overview
It is currently possible to have multiple forks of the same project within a namespace (see https://gitlab.com/reproduction-group/plain-html-1, https://gitlab.com/reproduction-group/plain-html-2). However when you click the fork button of a project and select a namespace that already contains a fork of the same project, a user is redirected to the existing fork and cannot create a new one. So we are hiding existing functionality behind an incomplete UI here.
Use cases
I'd like to distinguish two motivations for creating a fork here.
Fork as a copy
For this use case, a user really only wants to have a copy of the existing repository. So forking is a shorthand of pulling a repository, creating a new project and pushing the existing repository to the new project. In this case the forking relationship is usually not necessary and can be removed.
This use case is for example advertised for GitLab pages.
The current situation raises a problem for this use case when a user wants to keep the forking relationship intact of one fork (for example to send in upstream fixes). In that case a user can no longer create new copies.
Fork as base for development
In this use case a fork is created because the user wants to diverge from the existing project but does not want or is not allowed to create new branches in the original project. This is for example happening when community contributions are made to GitLab CE.
The motivation for this use case to have multiple forks is less clear. One reason would be to keep maintain multiple forks within a group and assign different users to them. For example this can be necessary to keep responsibilities separate for large projects (frontend fork / backend fork). It is also necessary for a monotree workflow.
Feature checklist
Make sure these are completed before closing the issue, with a link to the relevant commit.
- Feature assurance
- Documentation
- Added to features.yml