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
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 12:09:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 12:09:24 +0300
commit4720b569f0fcbb47e9f1a60e95172ae63b6f065a (patch)
tree5c6bcecbca227e608753a57a9aad19ccfe0567b6 /lib
parentcefe554b7ce2d0b52f9de855be832a47c2bc24ab (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/blob.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/gitlab/git/blob.rb b/lib/gitlab/git/blob.rb
index 4808cd936f5..f2a6211f270 100644
--- a/lib/gitlab/git/blob.rb
+++ b/lib/gitlab/git/blob.rb
@@ -5,6 +5,7 @@ module Gitlab
class Blob
include Gitlab::BlobHelper
include Gitlab::EncodingHelper
+ include Gitlab::Metrics::Methods
extend Gitlab::Git::WrapsGitalyErrors
# This number is the maximum amount of data that we want to display to
@@ -26,6 +27,14 @@ module Gitlab
attr_accessor :name, :path, :size, :data, :mode, :id, :commit_id, :loaded_size, :binary
+ define_counter :gitlab_blob_truncated_true do
+ docstring 'blob.truncated? == true'
+ end
+
+ define_counter :gitlab_blob_truncated_false do
+ docstring 'blob.truncated? == false'
+ end
+
class << self
def find(repository, sha, path, limit: MAX_DATA_DISPLAY_SIZE)
tree_entry(repository, sha, path, limit)