git 1.13.1 → 1.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/git/escaped_path.rb +1 -1
- data/lib/git/lib.rb +29 -26
- data/lib/git/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29b8c6b76f613f41bcddf2786fe9b164ef2168f265f3b8fdccb9f8f4ead52669
|
4
|
+
data.tar.gz: b0f66b11fd1a2eba3640bfa42ff842dcfbd52ab30455026b97ebecad8fd86f0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb85d50e45a905b7e71617da29f6194e478b17aed237237e0dd53066a5182c328d4e992494a3b7d26df47223c0e601733400e62d04b7e9fffdf8993c22cd2fb5
|
7
|
+
data.tar.gz: ee9d9edbd87615caee4cc073acd2df9a047b46d5ba117997f193a98d28374d214e2994018d3bed10c0e4acad7cd913ba39da25ecc2b0fd973863930f19d0f129
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,15 @@
|
|
5
5
|
|
6
6
|
# Change Log
|
7
7
|
|
8
|
+
## v1.13.2 (2023-02-02)
|
9
|
+
|
10
|
+
[Full Changelog](https://github.com/ruby-git/ruby-git/compare/v1.13.1..v1.13.2)
|
11
|
+
|
12
|
+
Changes since v1.13.1:
|
13
|
+
|
14
|
+
* b6e031d Fix `Git::Lib#commit_data` for GPG-signed commits (#610)
|
15
|
+
* b12b820 Fix escaped path decoding (#612)
|
16
|
+
|
8
17
|
## v1.13.1 (2023-01-12)
|
9
18
|
|
10
19
|
[Full Changelog](https://github.com/ruby-git/ruby-git/compare/v1.13.0...v1.13.1)
|
data/lib/git/escaped_path.rb
CHANGED
data/lib/git/lib.rb
CHANGED
@@ -221,54 +221,57 @@ module Git
|
|
221
221
|
def commit_data(sha)
|
222
222
|
sha = sha.to_s
|
223
223
|
cdata = command_lines('cat-file', 'commit', sha)
|
224
|
-
process_commit_data(cdata, sha
|
224
|
+
process_commit_data(cdata, sha)
|
225
225
|
end
|
226
226
|
|
227
|
-
def process_commit_data(data, sha
|
227
|
+
def process_commit_data(data, sha)
|
228
228
|
hsh = {
|
229
|
-
'sha'
|
230
|
-
'
|
231
|
-
'parent' => []
|
229
|
+
'sha' => sha,
|
230
|
+
'parent' => []
|
232
231
|
}
|
233
232
|
|
234
|
-
|
235
|
-
key, *value = data.shift.split
|
236
|
-
|
237
|
-
break if key.nil?
|
238
|
-
|
233
|
+
each_cat_file_header(data) do |key, value|
|
239
234
|
if key == 'parent'
|
240
|
-
hsh['parent'] << value
|
235
|
+
hsh['parent'] << value
|
241
236
|
else
|
242
|
-
hsh[key] = value
|
237
|
+
hsh[key] = value
|
243
238
|
end
|
244
239
|
end
|
245
240
|
|
246
|
-
hsh['message'] = data.
|
241
|
+
hsh['message'] = data.join("\n") + "\n"
|
247
242
|
|
248
243
|
return hsh
|
249
244
|
end
|
250
245
|
|
246
|
+
CAT_FILE_HEADER_LINE = /\A(?<key>\w+) (?<value>.*)\z/
|
247
|
+
|
248
|
+
def each_cat_file_header(data)
|
249
|
+
while (match = CAT_FILE_HEADER_LINE.match(data.shift))
|
250
|
+
key = match[:key]
|
251
|
+
value_lines = [match[:value]]
|
252
|
+
|
253
|
+
while data.first.start_with?(' ')
|
254
|
+
value_lines << data.shift.lstrip
|
255
|
+
end
|
256
|
+
|
257
|
+
yield key, value_lines.join("\n")
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
251
261
|
def tag_data(name)
|
252
262
|
sha = sha.to_s
|
253
263
|
tdata = command_lines('cat-file', 'tag', name)
|
254
|
-
process_tag_data(tdata, name
|
264
|
+
process_tag_data(tdata, name)
|
255
265
|
end
|
256
266
|
|
257
|
-
def process_tag_data(data, name
|
258
|
-
hsh = {
|
259
|
-
'name' => name,
|
260
|
-
'message' => ''
|
261
|
-
}
|
262
|
-
|
263
|
-
loop do
|
264
|
-
key, *value = data.shift.split
|
265
|
-
|
266
|
-
break if key.nil?
|
267
|
+
def process_tag_data(data, name)
|
268
|
+
hsh = { 'name' => name }
|
267
269
|
|
268
|
-
|
270
|
+
each_cat_file_header(data) do |key, value|
|
271
|
+
hsh[key] = value
|
269
272
|
end
|
270
273
|
|
271
|
-
hsh['message'] = data.
|
274
|
+
hsh['message'] = data.join("\n") + "\n"
|
272
275
|
|
273
276
|
return hsh
|
274
277
|
end
|
data/lib/git/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.13.
|
4
|
+
version: 1.13.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Chacon and others
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
231
|
version: '0'
|
232
232
|
requirements:
|
233
233
|
- git 1.6.0.0, or greater
|
234
|
-
rubygems_version: 3.
|
234
|
+
rubygems_version: 3.4.1
|
235
235
|
signing_key:
|
236
236
|
specification_version: 4
|
237
237
|
summary: An API to create, read, and manipulate Git repositories
|