gitlab_git 9.0.1 → 9.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 918fb34f97acc6f5d4065767e005ba2b5ffed166
4
- data.tar.gz: f16d2885d1c4b20708e3b8483da85d1cd3fefcae
3
+ metadata.gz: 14ccd03ccf2f97ca59ae88f4c50979b928e75f66
4
+ data.tar.gz: 417da7b58a2102d460fe859a7d1b72cc13a02253
5
5
  SHA512:
6
- metadata.gz: a38a52b74be4277d930c10b4735dde75e2f6a2040c2f5ceee6710a67da719adc447ea42cb46336371e8a355e0396ebe51e7e08c3ddae567b1cd2bd28ef9816b7
7
- data.tar.gz: 30ff567681ea48ce8efbe7a86f4092a38a1d3e46097d6b9e04b125365949087d11004cbfadd901bfd57a7d4532ef75056b4bc038b960b1f2de79aca23c2111bc
6
+ metadata.gz: b54ad94d138b1906ea3fccd0d31b808b937b456cff03c3e6981cb0e783a4035e6100eca2ad51411aa43518560ab8e2645b8591c34835623597dd187d75468f97
7
+ data.tar.gz: 6baf99270d4261595eb34817fb964cb528b8d420d9caf214dddf475142e0ad5339e4773e4ff25fa993b6c0863076d32af279f0e025bf81343d166c04d8fe24ca
data/VERSION CHANGED
@@ -1 +1 @@
1
- 9.0.1
1
+ 9.0.2
@@ -10,7 +10,8 @@ module Gitlab
10
10
  :id, :message, :parent_ids,
11
11
  :authored_date, :author_name, :author_email,
12
12
  :committed_date, :committer_name, :committer_email
13
- ]
13
+ ].freeze
14
+
14
15
  attr_accessor *SERIALIZE_KEYS
15
16
 
16
17
  def ==(other)
@@ -119,11 +120,11 @@ module Gitlab
119
120
  break_rewrites = options[:break_rewrites]
120
121
  actual_options = Diff.filter_diff_options(options)
121
122
 
122
- if rugged_commit.parents.empty?
123
- diff = rugged_commit.diff(actual_options.merge(reverse: true))
124
- else
125
- diff = rugged_commit.parents[0].diff(rugged_commit, actual_options)
126
- end
123
+ diff = if rugged_commit.parents.empty?
124
+ rugged_commit.diff(actual_options.merge(reverse: true))
125
+ else
126
+ rugged_commit.parents[0].diff(rugged_commit, actual_options)
127
+ end
127
128
 
128
129
  diff.find_similar!(break_rewrites: break_rewrites)
129
130
  diff
@@ -9,7 +9,7 @@ module Gitlab
9
9
  attr_accessor :old_path, :new_path, :a_mode, :b_mode, :diff
10
10
 
11
11
  # Stats properties
12
- attr_accessor :new_file, :renamed_file, :deleted_file
12
+ attr_accessor :new_file, :renamed_file, :deleted_file
13
13
 
14
14
  class << self
15
15
  def between(repo, head, base, options = {}, *paths)
@@ -169,7 +169,7 @@ module Gitlab
169
169
  end
170
170
 
171
171
  def serialize_keys
172
- @serialize_keys ||= %w(diff new_path old_path a_mode b_mode new_file renamed_file deleted_file).map(&:to_sym)
172
+ @serialize_keys ||= %i(diff new_path old_path a_mode b_mode new_file renamed_file deleted_file)
173
173
  end
174
174
 
175
175
  def to_hash
@@ -222,7 +222,7 @@ module Gitlab
222
222
  # 'Binary'
223
223
  diff_text.sub!(/\A.*?^(---|Binary)/m, '\1')
224
224
 
225
- if diff_text.start_with?('---') or diff_text.start_with?('Binary')
225
+ if diff_text.start_with?('---', 'Binary')
226
226
  diff_text
227
227
  else
228
228
  # If the diff_text did not contain a line starting with '---' or
@@ -785,8 +785,10 @@ module Gitlab
785
785
  from_sha = rugged.rev_parse_oid(from)
786
786
  to_sha = rugged.rev_parse_oid(to)
787
787
  commits_between(from_sha, to_sha).map do |commit|
788
- commit.to_mbox(actual_options)
789
- end.join("\n")
788
+ # Ignore merge commits, which have more than one parent,
789
+ # in creation of patch to mimic the behavior of `git format-patch`
790
+ commit.to_mbox(actual_options) if commit.parents.length <= 1
791
+ end.flatten.join("\n")
790
792
  end
791
793
 
792
794
  # Merge the +source_name+ branch into the +target_name+ branch. This is
@@ -947,7 +949,7 @@ module Gitlab
947
949
 
948
950
  current = ""
949
951
  content.split("\n").each do |txt|
950
- if txt.match(/^\s*\[/)
952
+ if txt =~ /^\s*\[/
951
953
  current = txt.match(/(?<=").*(?=")/)[0]
952
954
  results[current] = {}
953
955
  else
@@ -1,7 +1,7 @@
1
1
  module Gitlab
2
2
  module Git
3
3
  module Util
4
- LINE_SEP = "\n"
4
+ LINE_SEP = "\n".freeze
5
5
 
6
6
  def self.count_lines(string)
7
7
  case string[-1]
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: 9.0.1
4
+ version: 9.0.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-03-08 00:00:00.000000000 Z
11
+ date: 2016-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-linguist
@@ -111,9 +111,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  requirements: []
113
113
  rubyforge_project:
114
- rubygems_version: 2.5.1
114
+ rubygems_version: 2.4.8
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Gitlab::Git library
118
118
  test_files: []
119
- has_rdoc: