gitlab_git 9.0.1 → 9.0.2
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 +4 -4
- data/VERSION +1 -1
- data/lib/gitlab_git/commit.rb +7 -6
- data/lib/gitlab_git/diff.rb +3 -3
- data/lib/gitlab_git/repository.rb +5 -3
- data/lib/gitlab_git/util.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14ccd03ccf2f97ca59ae88f4c50979b928e75f66
|
4
|
+
data.tar.gz: 417da7b58a2102d460fe859a7d1b72cc13a02253
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b54ad94d138b1906ea3fccd0d31b808b937b456cff03c3e6981cb0e783a4035e6100eca2ad51411aa43518560ab8e2645b8591c34835623597dd187d75468f97
|
7
|
+
data.tar.gz: 6baf99270d4261595eb34817fb964cb528b8d420d9caf214dddf475142e0ad5339e4773e4ff25fa993b6c0863076d32af279f0e025bf81343d166c04d8fe24ca
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
9.0.
|
1
|
+
9.0.2
|
data/lib/gitlab_git/commit.rb
CHANGED
@@ -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
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
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
|
data/lib/gitlab_git/diff.rb
CHANGED
@@ -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
|
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 ||= %
|
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?('---'
|
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
|
-
|
789
|
-
|
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
|
952
|
+
if txt =~ /^\s*\[/
|
951
953
|
current = txt.match(/(?<=").*(?=")/)[0]
|
952
954
|
results[current] = {}
|
953
955
|
else
|
data/lib/gitlab_git/util.rb
CHANGED
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.
|
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-
|
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.
|
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:
|