diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-02 17:45:50 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-03 10:20:05 -0500 |
commit | 720cc14a754f1e528006c28fec4110f47297fd60 (patch) | |
tree | f4ef53efd8090aad6e49916b5287ff9c1085f3c1 /lib/gitlab | |
parent | 185fd98fd4cb8f920558aea3795c4e1774cd39f5 (diff) | |
download | gitlab-ce-dm-blob-external-storage.tar.gz |
Refactor Blob support of external storage in preparation of job artifact blobsdm-blob-external-storage
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/git/blob.rb | 12 |
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? |