git 4.3.1 → 4.3.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/.release-please-manifest.json +1 -1
- data/.rubocop.yml +4 -0
- data/.rubocop_todo.yml +1 -1
- data/CHANGELOG.md +13 -0
- data/lib/git/command_line.rb +1 -1
- data/lib/git/diff.rb +1 -1
- data/lib/git/lib.rb +14 -3
- data/lib/git/log.rb +2 -2
- data/lib/git/status.rb +0 -8
- data/lib/git/version.rb +1 -1
- data/lib/git.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 317aadaf4169f420466db692337037d90a5a7085dcc84b2b167a9dd5247f369a
|
|
4
|
+
data.tar.gz: 4308bcfb71982891d57cdec3c75d66c640c96788ac924f246df8c0d76a09fbf1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6e0b4a0da59ed13a76d46c68619ce882cdfaf9512b5ed3b1c0da3c57f5a763804cf866e3cd6ec374191d1cf506ab05953e4ad62878d28c771cb746be11cf2d94
|
|
7
|
+
data.tar.gz: a3db0a284e6211bfd9684422748b998df7cb8f21d8654f6a4e399879b7670287bc515bccfd7fdd885219fa39c167b738ab2b6ca694801523f5ffdb58d51d82ac
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
# Change Log
|
|
7
7
|
|
|
8
|
+
## [4.3.2](https://github.com/ruby-git/ruby-git/compare/v4.3.1...v4.3.2) (2026-03-31)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* Return empty result from git log on repo with no commits ([d275b25](https://github.com/ruby-git/ruby-git/commit/d275b25b03201ebaca13a81a75e3295ed85c40c7)), closes [#1155](https://github.com/ruby-git/ruby-git/issues/1155)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Other Changes
|
|
17
|
+
|
|
18
|
+
* Add docker-git script to test with specific git versions ([0cc0e80](https://github.com/ruby-git/ruby-git/commit/0cc0e804758e73520c124622a7ba49ff97f2deaf))
|
|
19
|
+
* Address newly reported rubocop offenses ([a37412d](https://github.com/ruby-git/ruby-git/commit/a37412d6a1cf2b927a6173ea767a7ad9f1290af6))
|
|
20
|
+
|
|
8
21
|
## [4.3.1](https://github.com/ruby-git/ruby-git/compare/v4.3.0...v4.3.1) (2026-02-20)
|
|
9
22
|
|
|
10
23
|
|
data/lib/git/command_line.rb
CHANGED
|
@@ -242,7 +242,7 @@ module Git
|
|
|
242
242
|
# @api private
|
|
243
243
|
#
|
|
244
244
|
def build_git_cmd(args)
|
|
245
|
-
raise ArgumentError, 'The args array can not contain an array' if args.any?
|
|
245
|
+
raise ArgumentError, 'The args array can not contain an array' if args.any?(Array)
|
|
246
246
|
|
|
247
247
|
[binary_path, *global_opts, *args].map(&:to_s)
|
|
248
248
|
end
|
data/lib/git/diff.rb
CHANGED
data/lib/git/lib.rb
CHANGED
|
@@ -289,7 +289,7 @@ module Git
|
|
|
289
289
|
|
|
290
290
|
arr_opts += log_path_options(opts)
|
|
291
291
|
|
|
292
|
-
command_lines('log', *arr_opts).map { |l| l.split.first }
|
|
292
|
+
log_or_empty_on_unborn { command_lines('log', *arr_opts).map { |l| l.split.first } }
|
|
293
293
|
end
|
|
294
294
|
|
|
295
295
|
FULL_LOG_EXTRA_OPTIONS_MAP = [
|
|
@@ -360,8 +360,10 @@ module Git
|
|
|
360
360
|
args += build_args(opts, FULL_LOG_EXTRA_OPTIONS_MAP)
|
|
361
361
|
args += log_path_options(opts)
|
|
362
362
|
|
|
363
|
-
|
|
364
|
-
|
|
363
|
+
log_or_empty_on_unborn do
|
|
364
|
+
full_log = command_lines('log', *args)
|
|
365
|
+
process_commit_log_data(full_log)
|
|
366
|
+
end
|
|
365
367
|
end
|
|
366
368
|
|
|
367
369
|
# Verify and resolve a Git revision to its full SHA
|
|
@@ -2262,5 +2264,14 @@ module Git
|
|
|
2262
2264
|
end
|
|
2263
2265
|
arr_opts
|
|
2264
2266
|
end
|
|
2267
|
+
|
|
2268
|
+
def log_or_empty_on_unborn
|
|
2269
|
+
yield
|
|
2270
|
+
rescue Git::FailedError => e
|
|
2271
|
+
raise unless e.result.status.exitstatus == 128 &&
|
|
2272
|
+
e.result.stderr =~ /does not have any commits yet/
|
|
2273
|
+
|
|
2274
|
+
[]
|
|
2275
|
+
end
|
|
2265
2276
|
end
|
|
2266
2277
|
end
|
data/lib/git/log.rb
CHANGED
|
@@ -32,7 +32,7 @@ module Git
|
|
|
32
32
|
def each(&block) = commits.each(&block)
|
|
33
33
|
def last = commits.last
|
|
34
34
|
def [](index) = commits[index]
|
|
35
|
-
def to_s =
|
|
35
|
+
def to_s = commits.join("\n")
|
|
36
36
|
def size = commits.size
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -117,7 +117,7 @@ module Git
|
|
|
117
117
|
'Calling Git::Log#to_s is deprecated. Call #execute and then #to_s on the result object.'
|
|
118
118
|
)
|
|
119
119
|
run_log_if_dirty
|
|
120
|
-
@commits&.
|
|
120
|
+
@commits&.join("\n")
|
|
121
121
|
end
|
|
122
122
|
|
|
123
123
|
# @deprecated Use {#execute} and call the method on the result.
|
data/lib/git/status.rb
CHANGED
|
@@ -80,11 +80,7 @@ module Git
|
|
|
80
80
|
rescue Git::FailedError
|
|
81
81
|
@_ignore_case = false
|
|
82
82
|
end
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
83
|
|
|
86
|
-
module Git
|
|
87
|
-
class Status
|
|
88
84
|
# Represents a single file's status in the git repository. Each instance
|
|
89
85
|
# holds information about a file's state in the index and working tree.
|
|
90
86
|
class StatusFile
|
|
@@ -109,11 +105,7 @@ module Git
|
|
|
109
105
|
@base.object(sha) if sha
|
|
110
106
|
end
|
|
111
107
|
end
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
108
|
|
|
115
|
-
module Git
|
|
116
|
-
class Status
|
|
117
109
|
# A factory class responsible for fetching git status data and building
|
|
118
110
|
# a hash of StatusFile objects.
|
|
119
111
|
# @api private
|
data/lib/git/version.rb
CHANGED
data/lib/git.rb
CHANGED
|
@@ -43,7 +43,7 @@ require 'git/worktrees'
|
|
|
43
43
|
#
|
|
44
44
|
# @author Scott Chacon (mailto:schacon@gmail.com)
|
|
45
45
|
#
|
|
46
|
-
module Git
|
|
46
|
+
module Git # rubocop:disable Style/OneClassPerFile
|
|
47
47
|
# g.config('user.name', 'Scott Chacon') # sets value
|
|
48
48
|
# g.config('user.email', 'email@email.com') # sets value
|
|
49
49
|
# g.config('user.name') # returns 'Scott Chacon'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: git
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.3.
|
|
4
|
+
version: 4.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Scott Chacon and others
|
|
@@ -310,8 +310,8 @@ licenses:
|
|
|
310
310
|
metadata:
|
|
311
311
|
homepage_uri: http://github.com/ruby-git/ruby-git
|
|
312
312
|
source_code_uri: http://github.com/ruby-git/ruby-git
|
|
313
|
-
changelog_uri: https://rubydoc.info/gems/git/4.3.
|
|
314
|
-
documentation_uri: https://rubydoc.info/gems/git/4.3.
|
|
313
|
+
changelog_uri: https://rubydoc.info/gems/git/4.3.2/file/CHANGELOG.md
|
|
314
|
+
documentation_uri: https://rubydoc.info/gems/git/4.3.2
|
|
315
315
|
rubygems_mfa_required: 'true'
|
|
316
316
|
rdoc_options: []
|
|
317
317
|
require_paths:
|
|
@@ -328,7 +328,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
328
328
|
version: '0'
|
|
329
329
|
requirements:
|
|
330
330
|
- git 2.28.0 or greater
|
|
331
|
-
rubygems_version: 4.0.
|
|
331
|
+
rubygems_version: 4.0.6
|
|
332
332
|
specification_version: 4
|
|
333
333
|
summary: An API to create, read, and manipulate Git repositories
|
|
334
334
|
test_files: []
|