git 1.13.0 → 1.13.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/.github/workflows/continuous_integration.yml +2 -2
- data/CHANGELOG.md +18 -0
- data/RELEASING.md +60 -58
- data/git.gemspec +1 -0
- data/lib/git/escaped_path.rb +1 -1
- data/lib/git/lib.rb +36 -31
- data/lib/git/version.rb +1 -1
- metadata +17 -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
|
|
@@ -13,7 +13,7 @@ jobs:
|
|
|
13
13
|
strategy:
|
|
14
14
|
fail-fast: false
|
|
15
15
|
matrix:
|
|
16
|
-
ruby: [2.3,
|
|
16
|
+
ruby: [2.7, 3.0, 3.1, 3.2]
|
|
17
17
|
operating-system: [ubuntu-latest]
|
|
18
18
|
include:
|
|
19
19
|
- ruby: head
|
|
@@ -34,7 +34,7 @@ jobs:
|
|
|
34
34
|
|
|
35
35
|
steps:
|
|
36
36
|
- name: Checkout Code
|
|
37
|
-
uses: actions/checkout@
|
|
37
|
+
uses: actions/checkout@v3
|
|
38
38
|
|
|
39
39
|
- name: Setup Ruby
|
|
40
40
|
uses: ruby/setup-ruby@v1
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@
|
|
|
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
|
+
|
|
17
|
+
## v1.13.1 (2023-01-12)
|
|
18
|
+
|
|
19
|
+
[Full Changelog](https://github.com/ruby-git/ruby-git/compare/v1.13.0...v1.13.1)
|
|
20
|
+
|
|
21
|
+
* 667b830 Update the GitHub Action step "actions/checkout" from v2 to v3 (#608)
|
|
22
|
+
* 23a0ac4 Fix version parsing (#605)
|
|
23
|
+
* 429f0bb Update release instructions (#606)
|
|
24
|
+
* 68d76b8 Drop ruby 2.3 build and add 3.1 and 3.2 builds (#607)
|
|
25
|
+
|
|
8
26
|
## v1.13.0 (2022-12-10)
|
|
9
27
|
|
|
10
28
|
[Full Changelog](https://github.com/ruby-git/ruby-git/compare/v1.12.0...v1.13.0)
|
data/RELEASING.md
CHANGED
|
@@ -8,61 +8,63 @@
|
|
|
8
8
|
Releasing a new version of the `git` gem requires these steps:
|
|
9
9
|
|
|
10
10
|
- [How to release a new git.gem](#how-to-release-a-new-gitgem)
|
|
11
|
-
- [
|
|
12
|
-
- [
|
|
13
|
-
- [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
11
|
+
- [Install Prerequisites](#install-prerequisites)
|
|
12
|
+
- [Prepare the Release](#prepare-the-release)
|
|
13
|
+
- [Review and Merge the Release](#review-and-merge-the-release)
|
|
14
|
+
- [Build and Release the Gem](#build-and-release-the-gem)
|
|
15
|
+
|
|
16
|
+
These instructions use an example where:
|
|
17
|
+
|
|
18
|
+
- The default branch is `master`
|
|
19
|
+
- The current release version is `1.5.0`
|
|
20
|
+
- You want to create a new *minor* release, `1.6.0`
|
|
21
|
+
|
|
22
|
+
## Install Prerequisites
|
|
23
|
+
|
|
24
|
+
The following tools need to be installed in order to create the release:
|
|
25
|
+
|
|
26
|
+
- [git](https://git-scm.com) is used to interact with the local and remote repositories
|
|
27
|
+
- [gh](https://cli.github.com) is used to create the release and PR in GitHub
|
|
28
|
+
- [Docker](https://www.docker.com) is used to run the script to create the release notes
|
|
29
|
+
|
|
30
|
+
On a Mac, these tools can be installed using [brew](https://brew.sh):
|
|
31
|
+
|
|
32
|
+
```shell
|
|
33
|
+
$ brew install git
|
|
34
|
+
...
|
|
35
|
+
$ brew install gh
|
|
36
|
+
...
|
|
37
|
+
$ brew install --cask docker
|
|
38
|
+
...
|
|
39
|
+
$
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Prepare the Release
|
|
43
|
+
|
|
44
|
+
Bump the version, create release notes, tag the release and create a GitHub release and PR which can be used to review the release.
|
|
45
|
+
|
|
46
|
+
Steps:
|
|
47
|
+
|
|
48
|
+
- Check out the code with `git clone https://github.com/ruby-git/ruby-git ruby-git-v1.6.0 && cd ruby-git-v1.6.0`
|
|
49
|
+
- Install development dependencies using bundle `bundle install`
|
|
50
|
+
- Based upon the nature of the changes, decide on the type of release: `major`, `minor`, or `patch` (in this example we will use `minor`)
|
|
51
|
+
- Run the release script `bundle exec create-github-release minor`
|
|
52
|
+
|
|
53
|
+
## Review and Merge the Release
|
|
54
|
+
|
|
55
|
+
Have the release PR approved and merge the changes into the `master` branch.
|
|
56
|
+
|
|
57
|
+
**IMPORTANT** DO NOT merge to the `master` branch using the GitHub UI. Instead use the instructions below.
|
|
58
|
+
|
|
59
|
+
Steps:
|
|
60
|
+
|
|
61
|
+
- Get the release PR reviewed and approved in GitHub
|
|
62
|
+
- Merge the changes with the command `git checkout master && git merge --ff-only v1.6.0 && git push`
|
|
63
|
+
|
|
64
|
+
## Build and Release the Gem
|
|
65
|
+
|
|
66
|
+
Build the gem and publish it to [rubygems.org](https://rubygems.org/gems/git)
|
|
67
|
+
|
|
68
|
+
Steps:
|
|
69
|
+
|
|
70
|
+
- Build and release the gem using rake `bundle exec rake release`
|
data/git.gemspec
CHANGED
|
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
|
|
|
30
30
|
s.add_runtime_dependency 'rchardet', '~> 1.8'
|
|
31
31
|
|
|
32
32
|
s.add_development_dependency 'bump', '~> 0.10'
|
|
33
|
+
s.add_development_dependency 'create_github_release', '~> 0.2'
|
|
33
34
|
s.add_development_dependency 'minitar', '~> 0.9'
|
|
34
35
|
s.add_development_dependency 'rake', '~> 13.0'
|
|
35
36
|
s.add_development_dependency 'test-unit', '~> 3.3'
|
data/lib/git/escaped_path.rb
CHANGED
data/lib/git/lib.rb
CHANGED
|
@@ -63,8 +63,6 @@ module Git
|
|
|
63
63
|
@git_work_dir = base[:working_directory]
|
|
64
64
|
end
|
|
65
65
|
@logger = logger
|
|
66
|
-
|
|
67
|
-
Git::Lib.warn_if_old_command(self)
|
|
68
66
|
end
|
|
69
67
|
|
|
70
68
|
# creates or reinitializes the repository
|
|
@@ -223,54 +221,57 @@ module Git
|
|
|
223
221
|
def commit_data(sha)
|
|
224
222
|
sha = sha.to_s
|
|
225
223
|
cdata = command_lines('cat-file', 'commit', sha)
|
|
226
|
-
process_commit_data(cdata, sha
|
|
224
|
+
process_commit_data(cdata, sha)
|
|
227
225
|
end
|
|
228
226
|
|
|
229
|
-
def process_commit_data(data, sha
|
|
227
|
+
def process_commit_data(data, sha)
|
|
230
228
|
hsh = {
|
|
231
|
-
'sha'
|
|
232
|
-
'
|
|
233
|
-
'parent' => []
|
|
229
|
+
'sha' => sha,
|
|
230
|
+
'parent' => []
|
|
234
231
|
}
|
|
235
232
|
|
|
236
|
-
|
|
237
|
-
key, *value = data.shift.split
|
|
238
|
-
|
|
239
|
-
break if key.nil?
|
|
240
|
-
|
|
233
|
+
each_cat_file_header(data) do |key, value|
|
|
241
234
|
if key == 'parent'
|
|
242
|
-
hsh['parent'] << value
|
|
235
|
+
hsh['parent'] << value
|
|
243
236
|
else
|
|
244
|
-
hsh[key] = value
|
|
237
|
+
hsh[key] = value
|
|
245
238
|
end
|
|
246
239
|
end
|
|
247
240
|
|
|
248
|
-
hsh['message'] = data.
|
|
241
|
+
hsh['message'] = data.join("\n") + "\n"
|
|
249
242
|
|
|
250
243
|
return hsh
|
|
251
244
|
end
|
|
252
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
|
+
|
|
253
261
|
def tag_data(name)
|
|
254
262
|
sha = sha.to_s
|
|
255
263
|
tdata = command_lines('cat-file', 'tag', name)
|
|
256
|
-
process_tag_data(tdata, name
|
|
264
|
+
process_tag_data(tdata, name)
|
|
257
265
|
end
|
|
258
266
|
|
|
259
|
-
def process_tag_data(data, name
|
|
260
|
-
hsh = {
|
|
261
|
-
'name' => name,
|
|
262
|
-
'message' => ''
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
loop do
|
|
266
|
-
key, *value = data.shift.split
|
|
267
|
-
|
|
268
|
-
break if key.nil?
|
|
267
|
+
def process_tag_data(data, name)
|
|
268
|
+
hsh = { 'name' => name }
|
|
269
269
|
|
|
270
|
-
|
|
270
|
+
each_cat_file_header(data) do |key, value|
|
|
271
|
+
hsh[key] = value
|
|
271
272
|
end
|
|
272
273
|
|
|
273
|
-
hsh['message'] = data.
|
|
274
|
+
hsh['message'] = data.join("\n") + "\n"
|
|
274
275
|
|
|
275
276
|
return hsh
|
|
276
277
|
end
|
|
@@ -1029,8 +1030,9 @@ module Git
|
|
|
1029
1030
|
# returns the current version of git, as an Array of Fixnums.
|
|
1030
1031
|
def current_command_version
|
|
1031
1032
|
output = command('version')
|
|
1032
|
-
version = output[/\d
|
|
1033
|
-
version.split('.').collect {|i| i.to_i}
|
|
1033
|
+
version = output[/\d+(\.\d+)+/]
|
|
1034
|
+
version_parts = version.split('.').collect { |i| i.to_i }
|
|
1035
|
+
version_parts.fill(0, version_parts.length...3)
|
|
1034
1036
|
end
|
|
1035
1037
|
|
|
1036
1038
|
def required_command_version
|
|
@@ -1043,10 +1045,11 @@ module Git
|
|
|
1043
1045
|
|
|
1044
1046
|
def self.warn_if_old_command(lib)
|
|
1045
1047
|
return true if @version_checked
|
|
1048
|
+
@version_checked = true
|
|
1046
1049
|
unless lib.meets_required_version?
|
|
1047
1050
|
$stderr.puts "[WARNING] The git gem requires git #{lib.required_command_version.join('.')} or later, but only found #{lib.current_command_version.join('.')}. You should probably upgrade."
|
|
1048
1051
|
end
|
|
1049
|
-
|
|
1052
|
+
true
|
|
1050
1053
|
end
|
|
1051
1054
|
|
|
1052
1055
|
private
|
|
@@ -1104,6 +1107,8 @@ module Git
|
|
|
1104
1107
|
end
|
|
1105
1108
|
|
|
1106
1109
|
def command(cmd, *opts, &block)
|
|
1110
|
+
Git::Lib.warn_if_old_command(self)
|
|
1111
|
+
|
|
1107
1112
|
command_opts = { chomp: true, redirect: '' }
|
|
1108
1113
|
if opts.last.is_a?(Hash)
|
|
1109
1114
|
command_opts.merge!(opts.pop)
|
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:
|
|
11
|
+
date: 2023-02-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|
|
@@ -52,6 +52,20 @@ dependencies:
|
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0.10'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: create_github_release
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0.2'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0.2'
|
|
55
69
|
- !ruby/object:Gem::Dependency
|
|
56
70
|
name: minitar
|
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -217,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
217
231
|
version: '0'
|
|
218
232
|
requirements:
|
|
219
233
|
- git 1.6.0.0, or greater
|
|
220
|
-
rubygems_version: 3.
|
|
234
|
+
rubygems_version: 3.4.1
|
|
221
235
|
signing_key:
|
|
222
236
|
specification_version: 4
|
|
223
237
|
summary: An API to create, read, and manipulate Git repositories
|