Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-08-07 17:26:50 +0300
committerJacob Vosmaer <jacob@gitlab.com>2017-08-07 17:26:50 +0300
commit29a1c5a126e7289dcaa710cc0933057bf274aff2 (patch)
treef0a3b7b0a602539e515aca3a4772a85df7f6ba94 /lib/gitlab/git/blob.rb
parent5e20e448cec833cc10d2cc4c305a056e0f29ed83 (diff)
Rename 'limit' to 'blob_size_limit'
Diffstat (limited to 'lib/gitlab/git/blob.rb')
-rw-r--r--lib/gitlab/git/blob.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/gitlab/git/blob.rb b/lib/gitlab/git/blob.rb
index 0b98be3a14f..77b81d2d437 100644
--- a/lib/gitlab/git/blob.rb
+++ b/lib/gitlab/git/blob.rb
@@ -51,18 +51,17 @@ module Gitlab
end
# Returns an array of Blob instances, specified in blob_references as
- # [[commit_sha, path], [commit_sha, path], ...]. If limit < 0 then the
- # full blob contents are returned. If limit >= 0 then each blob will
+ # [[commit_sha, path], [commit_sha, path], ...]. If blob_size_limit < 0 then the
+ # full blob contents are returned. If blob_size_limit >= 0 then each blob will
# contain no more than limit bytes in its data attribute.
#
# Keep in mind that this method may allocate a lot of memory. It is up
- # to the caller to limit the number of blobs and/or the content limit
- # for the individual blobs.
+ # to the caller to limit the number of blobs and blob_size_limit.
#
- def batch(repository, blob_references, limit: nil)
- limit ||= MAX_DATA_DISPLAY_SIZE
+ def batch(repository, blob_references, blob_size_limit: nil)
+ blob_size_limit ||= MAX_DATA_DISPLAY_SIZE
blob_references.map do |sha, path|
- find_by_rugged(repository, sha, path, limit: limit)
+ find_by_rugged(repository, sha, path, limit: blob_size_limit)
end
end