Limit git rev-list output count to one in forced push check
What does this MR do?
It adds --max-count=1
to the git command used to check for forced push, this way we can have a brief yet indicative output, saving some time used to split the string returned.
Credits go to @pacoguzman for pointing me to the command option.
Are there points in the code the reviewer needs to double check?
Don't think so.
Why was this MR needed?
It could allow for faster check of forced pushes.
What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/14280#note_13177575
Screenshots (if relevant)
N/A
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added -
Tests-
Added for this feature/bug -
All builds are passing
-
-
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together