summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-05-03 19:54:30 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-05-03 19:54:30 +0000
commitc1e2da9293bb036280c05ee6b99952b067bdc316 (patch)
tree912fd7dd0b9a9730b4503e3875d5b233b8e57893 /lib
parent907f006c4cab51d942e931226fe874dd0985838b (diff)
parent720cc14a754f1e528006c28fec4110f47297fd60 (diff)
downloadgitlab-ce-c1e2da9293bb036280c05ee6b99952b067bdc316.tar.gz
Merge branch 'dm-blob-external-storage' into 'master'
Refactor Blob support of external storage in preparation of job artifact blobs See merge request !11048
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/blob.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/gitlab/git/blob.rb b/lib/gitlab/git/blob.rb
index e8bb9e1f805..12458f9f410 100644
--- a/lib/gitlab/git/blob.rb
+++ b/lib/gitlab/git/blob.rb
@@ -128,6 +128,10 @@ module Gitlab
encode! @name
end
+ def truncated?
+ size && (size > loaded_size)
+ end
+
# Valid LFS object pointer is a text file consisting of
# version
# oid
@@ -155,10 +159,14 @@ module Gitlab
nil
end
- def truncated?
- size && (size > loaded_size)
+ def external_storage
+ return unless lfs_pointer?
+
+ :lfs
end
+ alias_method :external_size, :lfs_size
+
private
def has_lfs_version_key?