Defer updating .git/config for imported projects
Normally when a project is created, `Projects::CreateService` attempts to initialize a Git directory and update the `.git/config` to include the human-readable project full path. However, for forks and project imports, the repository is imported in a separate background job (e.g. RepositoryForkWorker, RepositoryImportWorker). As a result, attempts to write to the `.git/config` directory will fail unless the job has completed first. https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35305 will ensure that the `.git/config` is updated after the import is successful. This commit will prevent attempts to `.git/config` for project imports and forks from occuring right after project creation.
Showing
Please register or sign in to comment