gitlab_git 10.1.1 → 10.1.2
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 +4 -0
- data/lib/gitlab_git/diff_collection.rb +4 -1
- 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: d11e929a847b0ead24d039c132c3fa3c05815c61
|
4
|
+
data.tar.gz: 8e965143c170a140628ca39097c50d616bdd268b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5785a2fefa0fab91f006078947d0bf8ebf660450cc001296a46b8fb42203f5379a1e88ddcb01d9a1e7c1ab71e56591e4994c41def24764de6b959058753104ca
|
7
|
+
data.tar.gz: 3976529a53e2a7ffc68c21ce8c7fe2fb38de5bbe70ca72f80b386b9d5390c2c9e2ff41d736bc17dd5205b307689245adf8a31949815a92799eccbf08a537b9a5
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
10.1.
|
1
|
+
10.1.2
|
data/lib/gitlab_git/blob.rb
CHANGED
@@ -212,6 +212,8 @@ module Gitlab
|
|
212
212
|
%w(id name path size data mode commit_id).each do |key|
|
213
213
|
self.send("#{key}=", options[key.to_sym])
|
214
214
|
end
|
215
|
+
|
216
|
+
@loaded_all_data = false
|
215
217
|
end
|
216
218
|
|
217
219
|
def empty?
|
@@ -226,7 +228,9 @@ module Gitlab
|
|
226
228
|
# memory as a Ruby string.
|
227
229
|
def load_all_data!(repository)
|
228
230
|
return if @data == '' # don't mess with submodule blobs
|
231
|
+
return @data if @loaded_all_data
|
229
232
|
|
233
|
+
@loaded_all_data = true
|
230
234
|
@data = repository.lookup(id).content
|
231
235
|
end
|
232
236
|
|
@@ -9,9 +9,11 @@ module Gitlab
|
|
9
9
|
@iterator = iterator
|
10
10
|
@max_files = options.fetch(:max_files, DEFAULT_LIMITS[:max_files])
|
11
11
|
@max_lines = options.fetch(:max_lines, DEFAULT_LIMITS[:max_lines])
|
12
|
+
@max_bytes = @max_files * 5120 # Average 5 KB per file
|
12
13
|
@all_diffs = !!options.fetch(:all_diffs, false)
|
13
14
|
|
14
15
|
@line_count = 0
|
16
|
+
@byte_count = 0
|
15
17
|
@overflow = false
|
16
18
|
@array = Array.new
|
17
19
|
end
|
@@ -46,8 +48,9 @@ module Gitlab
|
|
46
48
|
end
|
47
49
|
|
48
50
|
@line_count += diff.line_count
|
51
|
+
@byte_count += diff.diff.bytesize
|
49
52
|
|
50
|
-
if !@all_diffs && @line_count >= @max_lines
|
53
|
+
if !@all_diffs && (@line_count >= @max_lines || @byte_count >= @max_bytes)
|
51
54
|
# This last Diff instance pushes us over the lines limit. We stop and
|
52
55
|
# discard it.
|
53
56
|
@overflow = true
|
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: 10.1.
|
4
|
+
version: 10.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitriy Zaporozhets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-linguist
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.2.5
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Gitlab::Git library
|