Avoid slow File Lock checks when not used
What
Adds guard to prevent looking up every single new commit in git on every push
EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4548
Why
This was slow and leads to timeouts. Refactoring in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4091 meant that the guard was no longer skipping commit lookup
Acceptance criteria
-
EE MR (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4548) -
Changelog entry added, if necessary -
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-
-
End-to-end tests pass ( package-qa
manual pipeline job)
Related
Helps mitigate https://gitlab.com/gitlab-org/gitlab-ce/issues/43281
Edited by James Edwards-Jones