Skip to content

Make forking resumable

Forking can be really slow on GitLab.com: https://gitlab.com/gitlab-com/infrastructure/issues/3048#note_43822439

It also leads to the problem where if a fork is killed, we can't fork because the repository already exists.

To solve that second problem, we could do something like https://stackoverflow.com/a/3957733, where we start with an initial shallow clone, and then backfill with a fetch. This allows a fork to resume from its previous position if a job is killed.