gitlab_git 7.2.20 → 7.2.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/gitlab_git/blob.rb +33 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 449eca74aecd426432bda2b90b598114b1f6483b
|
4
|
+
data.tar.gz: 8552cc076a3b204352d6d063efb1ff290e450dab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a130a367a8400c37fe2f61a16f076e382087a864e470396be1c02686d23a81322ab2dc8f2b389591bb0c6af34e3699886f0c9ef68c1b8cdd639975162a98b0d8
|
7
|
+
data.tar.gz: ec9f8a5a6890edbdc94deab47f681122095de2f8f427d619b9095d643001b88d5168520d7b4daf2370be09c0bb0500be732a785cc48747db614e44e9e3ba40df
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
7.2.
|
1
|
+
7.2.21
|
data/lib/gitlab_git/blob.rb
CHANGED
@@ -220,6 +220,39 @@ module Gitlab
|
|
220
220
|
def name
|
221
221
|
encode! @name
|
222
222
|
end
|
223
|
+
|
224
|
+
# Valid LFS object pointer is a text file consisting of
|
225
|
+
# version
|
226
|
+
# oid
|
227
|
+
# size
|
228
|
+
# see https://github.com/github/git-lfs/blob/v1.1.0/docs/spec.md#the-pointer
|
229
|
+
def lfs_pointer?
|
230
|
+
has_lfs_version_key? && lfs_oid.present? && lfs_size.present?
|
231
|
+
end
|
232
|
+
|
233
|
+
def lfs_oid
|
234
|
+
if has_lfs_version_key?
|
235
|
+
oid = data.match(/(?<=sha256:)([0-9a-f]{64})/)
|
236
|
+
return oid[1] if oid
|
237
|
+
end
|
238
|
+
|
239
|
+
nil
|
240
|
+
end
|
241
|
+
|
242
|
+
def lfs_size
|
243
|
+
if has_lfs_version_key?
|
244
|
+
size = data.match(/(?<=size )([0-9]+)/)
|
245
|
+
return size[1] if size
|
246
|
+
end
|
247
|
+
|
248
|
+
nil
|
249
|
+
end
|
250
|
+
|
251
|
+
private
|
252
|
+
|
253
|
+
def has_lfs_version_key?
|
254
|
+
!empty? && text? && data.start_with?("version https://git-lfs.github.com/spec")
|
255
|
+
end
|
223
256
|
end
|
224
257
|
end
|
225
258
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab_git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.2.
|
4
|
+
version: 7.2.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitriy Zaporozhets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-linguist
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.4.8
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Gitlab::Git library
|