Add limiting option to Blob.find and Blob.raw
What does this MR do?
Add a limit:
argument to Gitlab::Git::Blob.find and Gitlab::Git::Blob.raw.
Also removes unused method Repository#blob_by_oid
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Because we could not indicate limits when loading a blob an awkward pattern has emerged over time. First load part of the blob, then reload the entire blob to be sure we dodged limiting. This change makes it so that callers can express their need for the entire blob the moment they load it.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Edited by Jacob Vosmaer (GitLab)