Skip to content

Don't allow Repository#log with limit zero

Jacob Vosmaer requested to merge limit-never-zero into master

What does this MR do?

Removes support for a poorly defined Gitlab::Git::Repository#log option. For good measure, make it an error if anybody passes in this value (limit zero or nil).

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

The old behavior was inconsistent. Rather than supporting that inconsistency, we can remove it.

It is never a good idea to try and create an array holding all the commits on a branch of a repository. The repository may be very large. There should always be some upper limit on how many commits we're loading.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Edited by Jacob Vosmaer

Merge request reports