Skip to content

Defer updating .git/config for imported projects

Stan Hu requested to merge sh-disable-gitconfig-write-on-imports-and-forks into master

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.

!35305 (merged) 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.

Edited by Stan Hu

Merge request reports