gitlab_git 10.2.0 → 10.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4256a9124c547dd37ad82929922826b549d035e
4
- data.tar.gz: 41c5334b6556a1936a5a83888bf30a0f0b6626ce
3
+ metadata.gz: 6c94b6a55ac8082363a377e7a9a7cc8c0d98638d
4
+ data.tar.gz: 75535b754be9e04d1d4ed19e718c502241221f03
5
5
  SHA512:
6
- metadata.gz: 45d7141e374418211be9691de8644deba06f420e53465b53d9bb59571382343c3d750e398b53524f21c50d54a105fe963a282e9fb783a5d6ada1828c90655b50
7
- data.tar.gz: c4787ce560bc314df0709c000298faebe77638c6a723bf6e5ba3edb32600f38a5cc30f51bc994ad1789aa8c74bc72f07aa50d4d19a5796f6339d890a1c815526
6
+ metadata.gz: 50ffd69f42646ba5f2c9c293127d64590744f965b33b158e543bc36c1673eb2da9af5dea7ae3abb94692afd5bc51fd888db8712191eabb80a162be44c66929ab
7
+ data.tar.gz: cd9d15af5c913484f62c0e18fd1a1962a28eff08d918f533427c55a4c954eefd826d7efc5276e150daa44f9c1ba7775aacf860839e885797e7d32e64b1341c5e
data/VERSION CHANGED
@@ -1 +1 @@
1
- 10.2.0
1
+ 10.2.1
@@ -13,7 +13,7 @@ module Gitlab
13
13
  # blob data should use load_all_data!.
14
14
  MAX_DATA_DISPLAY_SIZE = 10485760
15
15
 
16
- attr_accessor :name, :path, :size, :data, :mode, :id, :commit_id
16
+ attr_accessor :name, :path, :size, :data, :mode, :id, :commit_id, :loaded_size
17
17
 
18
18
  class << self
19
19
  def find(repository, sha, path)
@@ -215,6 +215,8 @@ module Gitlab
215
215
  end
216
216
 
217
217
  @loaded_all_data = false
218
+ # Retain the actual size before it is encoded
219
+ @loaded_size = @data.bytesize
218
220
  end
219
221
 
220
222
  def empty?
@@ -233,6 +235,7 @@ module Gitlab
233
235
 
234
236
  @loaded_all_data = true
235
237
  @data = repository.lookup(id).content
238
+ @loaded_size = @data.bytesize
236
239
  end
237
240
 
238
241
  def name
@@ -267,7 +270,7 @@ module Gitlab
267
270
  end
268
271
 
269
272
  def truncated?
270
- size > data.bytes.size
273
+ size && (size > loaded_size)
271
274
  end
272
275
 
273
276
  private
@@ -809,22 +809,6 @@ module Gitlab
809
809
  rugged.remotes[remote_name].push(refspecs)
810
810
  end
811
811
 
812
- # Return a String containing the mbox-formatted diff between +from+ and
813
- # +to+. See #diff for the allowed keys in the +options+ hash.
814
- def format_patch(from, to, options = {})
815
- options ||= {}
816
- break_rewrites = options[:break_rewrites]
817
- actual_options = Diff.filter_diff_options(options)
818
-
819
- from_sha = rugged.rev_parse_oid(from)
820
- to_sha = rugged.rev_parse_oid(to)
821
- commits_between(from_sha, to_sha).map do |commit|
822
- # Ignore merge commits, which have more than one parent,
823
- # in creation of patch to mimic the behavior of `git format-patch`
824
- commit.to_mbox(actual_options) if commit.parents.length <= 1
825
- end.flatten.join("\n")
826
- end
827
-
828
812
  # Merge the +source_name+ branch into the +target_name+ branch. This is
829
813
  # equivalent to `git merge --no_ff +source_name+`, since a merge commit
830
814
  # is always created.
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.2.0
4
+ version: 10.2.1
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-06-16 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-linguist