Avoid indexing twice when pull mirroring
The following discussion from !14413 (merged) should be addressed:
-
@nick.thomas started a discussion: (+3 comments) Hmmm. I'm actually starting to wonder if we need this code at all.
Does a pull mirror running cause the git repository's
post-receivehook to run? If so, then we'll be doing double work here. Perhaps we can remove this code altogether? We had a similar case for wiki indexing, for instance.It would need careful manual testing to verify, since the hooks don't run in the gitlab-ee test suite :(
Findings
- Pull mirroring does trigger
post-receive - Importing does not trigger
post-receive - On the project import form we have a checkbox to enable mirroring at the same time
Possible solutions
- Making the hooks run in the import case
- Distinguishing between the two cases in
ProjectImportState