summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2018-03-16 13:35:03 +0000
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2018-03-16 13:35:03 +0000
commitc1e3942122eab23734e102d5690ae94d8a702881 (patch)
tree650e1bea33ccaba343745a65cd0fc459bfea2770 /lib
parent9d32fccfa77effd52f40a0783ca4ce8caccde8de (diff)
downloadgitlab-ce-c1e3942122eab23734e102d5690ae94d8a702881.tar.gz
Extract constant for LfsPointerFile::VERSION_LINE
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/lfs_pointer_file.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/git/lfs_pointer_file.rb b/lib/gitlab/git/lfs_pointer_file.rb
index 61747fd5fcb..2ae0a889590 100644
--- a/lib/gitlab/git/lfs_pointer_file.rb
+++ b/lib/gitlab/git/lfs_pointer_file.rb
@@ -1,13 +1,16 @@
module Gitlab
module Git
class LfsPointerFile
+ VERSION = "https://git-lfs.github.com/spec/v1".freeze
+ VERSION_LINE = "version #{VERSION}".freeze
+
def initialize(data)
@data = data
end
def pointer
@pointer ||= <<~FILE
- version https://git-lfs.github.com/spec/v1
+ #{VERSION_LINE}
oid sha256:#{sha256}
size #{size}
FILE