git 4.0.5 → 4.0.6
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/CHANGELOG.md +13 -0
- data/Rakefile +11 -72
- data/lib/git/base.rb +12 -3
- data/lib/git/lib.rb +1 -1
- data/lib/git/object.rb +4 -1
- data/lib/git/version.rb +1 -1
- data/tasks/gem_tasks.rake +10 -0
- data/tasks/rubocop.rake +5 -0
- data/tasks/test.rake +13 -0
- data/tasks/test_gem.rake +12 -0
- data/tasks/yard.rake +23 -0
- metadata +8 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 745cd9f7795f87b785c30e602beac5dbb8316285483c09fb2916501abbe3bfc5
|
|
4
|
+
data.tar.gz: 55d63b9dbc37818a2cd8318719c574cc6bf3d5ea0ec472bc30b1c20f7aa72469
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e69ba4cc1d26544190b301efee7ecefc735aa39cf516dd668194a8bb3dbaa2db46ba21556c94ba434c88397615b9cab46141a9fe616bba8948964190ac6163af
|
|
7
|
+
data.tar.gz: 9f66300f937ca9bef982a6c149c53c404548fb59d27fa07e3be853f7b783525f65ef03f8e2a184189dc780fd0556716199162ddfadbc007e315a7f5c2988275a
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
# Change Log
|
|
7
7
|
|
|
8
|
+
## [4.0.6](https://github.com/ruby-git/ruby-git/compare/v4.0.5...v4.0.6) (2025-11-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* Standardize deprecation handling and consolidate tests (fixes [#842](https://github.com/ruby-git/ruby-git/issues/842)) ([a731110](https://github.com/ruby-git/ruby-git/commit/a73111017a64bd1ae83d35f9d5f4a18f43f7c2eb))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Other Changes
|
|
17
|
+
|
|
18
|
+
* Refactor Rakefile by splitting tasks into separate files ([bd69f9b](https://github.com/ruby-git/ruby-git/commit/bd69f9b6a48298a9c6eed1987bec55b67384b89c))
|
|
19
|
+
* Remove redundant escape in BRANCH_LINE_REGEXP (Style/RedundantRegexpEscape) ([4a03b5c](https://github.com/ruby-git/ruby-git/commit/4a03b5ce2939ad8a92496a443a6edcd6ce059a70))
|
|
20
|
+
|
|
8
21
|
## [4.0.5](https://github.com/ruby-git/ruby-git/compare/v4.0.4...v4.0.5) (2025-08-20)
|
|
9
22
|
|
|
10
23
|
|
data/Rakefile
CHANGED
|
@@ -1,79 +1,18 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require '
|
|
4
|
-
require 'English'
|
|
3
|
+
require 'rake/clean'
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
# Load all .rake files from tasks and its subdirectories.
|
|
6
|
+
Dir.glob('tasks/**/*.rake').each { |r| load r }
|
|
7
7
|
|
|
8
8
|
default_tasks = []
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
# $ bin/test test_archive.rb
|
|
18
|
-
#
|
|
19
|
-
# $ bin/test test_archive.rb test_object.rb
|
|
20
|
-
end
|
|
21
|
-
default_tasks << :test
|
|
22
|
-
|
|
23
|
-
# Rubocop
|
|
24
|
-
|
|
25
|
-
require 'rubocop/rake_task'
|
|
26
|
-
|
|
27
|
-
RuboCop::RakeTask.new
|
|
28
|
-
|
|
29
|
-
default_tasks << :rubocop
|
|
30
|
-
|
|
31
|
-
# YARD
|
|
32
|
-
|
|
33
|
-
unless RUBY_PLATFORM == 'java' || RUBY_ENGINE == 'truffleruby'
|
|
34
|
-
#
|
|
35
|
-
# YARD documentation for this project can NOT be built with JRuby.
|
|
36
|
-
# This project uses the redcarpet gem which can not be installed on JRuby.
|
|
37
|
-
#
|
|
38
|
-
require 'yard'
|
|
39
|
-
YARD::Rake::YardocTask.new
|
|
40
|
-
CLEAN << '.yardoc'
|
|
41
|
-
CLEAN << 'doc'
|
|
42
|
-
default_tasks << :yard
|
|
43
|
-
|
|
44
|
-
require 'yardstick/rake/verify'
|
|
45
|
-
Yardstick::Rake::Verify.new(:'yardstick:coverage') do |t|
|
|
46
|
-
t.threshold = 50
|
|
47
|
-
t.require_exact_threshold = false
|
|
48
|
-
end
|
|
49
|
-
default_tasks << :'yardstick:coverage'
|
|
50
|
-
|
|
51
|
-
desc 'Run yardstick to check yard docs'
|
|
52
|
-
task :yardstick do
|
|
53
|
-
sh "yardstick 'lib/**/*.rb'"
|
|
54
|
-
end
|
|
55
|
-
# Do not include yardstick as a default task for now since there are too many
|
|
56
|
-
# warnings. Will work to get the warnings down before re-enabling it.
|
|
57
|
-
#
|
|
58
|
-
# default_tasks << :yardstick
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
default_tasks << :build
|
|
9
|
+
default_tasks << :test if Rake::Task.task_defined?(:test)
|
|
10
|
+
default_tasks << :rubocop if Rake::Task.task_defined?(:rubocop)
|
|
11
|
+
default_tasks << :yard if Rake::Task.task_defined?(:yard)
|
|
12
|
+
default_tasks << :'yardstick:coverage' if Rake::Task.task_defined?(:'yardstick:coverage')
|
|
13
|
+
# Do not include yardstick as a default task for now since there are too many
|
|
14
|
+
# warnings. Will work to get the warnings down before re-enabling it.
|
|
15
|
+
# default_tasks << :yardstick if Rake::Task.task_defined?(:yardstick)
|
|
16
|
+
default_tasks << :build if Rake::Task.task_defined?(:build)
|
|
62
17
|
|
|
63
18
|
task default: default_tasks
|
|
64
|
-
|
|
65
|
-
desc 'Build and install the git gem and run a sanity check'
|
|
66
|
-
task 'test:gem': :install do
|
|
67
|
-
output = `ruby -e "require 'git'; g = Git.open('.'); puts g.log.size"`.chomp
|
|
68
|
-
raise 'Gem test failed' unless $CHILD_STATUS.success?
|
|
69
|
-
raise 'Expected gem test to return an integer' unless output =~ /^\d+$/
|
|
70
|
-
|
|
71
|
-
puts 'Gem Test Succeeded'
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
# Make it so that calling `rake release` just calls `rake release:rubygem_push` to
|
|
75
|
-
# avoid creating and pushing a new tag.
|
|
76
|
-
|
|
77
|
-
Rake::Task['release'].clear
|
|
78
|
-
desc 'Customized release task to avoid creating a new tag'
|
|
79
|
-
task release: 'release:rubygem_push'
|
data/lib/git/base.rb
CHANGED
|
@@ -286,7 +286,10 @@ module Git
|
|
|
286
286
|
end
|
|
287
287
|
|
|
288
288
|
def is_local_branch?(branch) # rubocop:disable Naming/PredicatePrefix
|
|
289
|
-
Git.
|
|
289
|
+
Git::Deprecation.warn(
|
|
290
|
+
'Git::Base#is_local_branch? is deprecated and will be removed in a future version. ' \
|
|
291
|
+
'Use Git::Base#local_branch? instead.'
|
|
292
|
+
)
|
|
290
293
|
local_branch?(branch)
|
|
291
294
|
end
|
|
292
295
|
|
|
@@ -297,7 +300,10 @@ module Git
|
|
|
297
300
|
end
|
|
298
301
|
|
|
299
302
|
def is_remote_branch?(branch) # rubocop:disable Naming/PredicatePrefix
|
|
300
|
-
Git.
|
|
303
|
+
Git::Deprecation.warn(
|
|
304
|
+
'Git::Base#is_remote_branch? is deprecated and will be removed in a future version. ' \
|
|
305
|
+
'Use Git::Base#remote_branch? instead.'
|
|
306
|
+
)
|
|
301
307
|
remote_branch?(branch)
|
|
302
308
|
end
|
|
303
309
|
|
|
@@ -308,7 +314,10 @@ module Git
|
|
|
308
314
|
end
|
|
309
315
|
|
|
310
316
|
def is_branch?(branch) # rubocop:disable Naming/PredicatePrefix
|
|
311
|
-
Git.
|
|
317
|
+
Git::Deprecation.warn(
|
|
318
|
+
'Git::Base#is_branch? is deprecated and will be removed in a future version. ' \
|
|
319
|
+
'Use Git::Base#branch? instead.'
|
|
320
|
+
)
|
|
312
321
|
branch?(branch)
|
|
313
322
|
end
|
|
314
323
|
|
data/lib/git/lib.rb
CHANGED
|
@@ -679,7 +679,7 @@ module Git
|
|
|
679
679
|
# The branch's full refname
|
|
680
680
|
(?:
|
|
681
681
|
(?<not_a_branch>\(not[[:blank:]]a[[:blank:]]branch\)) |
|
|
682
|
-
|
|
682
|
+
(?:\(HEAD[[:blank:]]detached[[:blank:]]at[[:blank:]](?<detached_ref>[^)]+)\)) |
|
|
683
683
|
(?<refname>[^[[:blank:]]]+)
|
|
684
684
|
)
|
|
685
685
|
|
data/lib/git/object.rb
CHANGED
|
@@ -213,7 +213,10 @@ module Git
|
|
|
213
213
|
end
|
|
214
214
|
|
|
215
215
|
def set_commit(data) # rubocop:disable Naming/AccessorMethodName
|
|
216
|
-
Git.
|
|
216
|
+
Git::Deprecation.warn(
|
|
217
|
+
'Git::Object::Commit#set_commit is deprecated and will be removed in a future version. ' \
|
|
218
|
+
'Use #from_data instead.'
|
|
219
|
+
)
|
|
217
220
|
from_data(data)
|
|
218
221
|
end
|
|
219
222
|
|
data/lib/git/version.rb
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'bundler/gem_tasks'
|
|
4
|
+
|
|
5
|
+
# Make it so that calling `rake release` just calls `rake release:rubygem_push` to
|
|
6
|
+
# avoid creating and pushing a new tag.
|
|
7
|
+
|
|
8
|
+
Rake::Task['release'].clear
|
|
9
|
+
desc 'Customized release task to avoid creating a new tag'
|
|
10
|
+
task release: 'release:rubygem_push'
|
data/tasks/rubocop.rake
ADDED
data/tasks/test.rake
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
desc 'Run Unit Tests'
|
|
4
|
+
task :test do
|
|
5
|
+
sh 'ruby bin/test'
|
|
6
|
+
|
|
7
|
+
# You can run individual test files (or multiple files) from the command
|
|
8
|
+
# line with:
|
|
9
|
+
#
|
|
10
|
+
# $ bin/test test_archive.rb
|
|
11
|
+
#
|
|
12
|
+
# $ bin/test test_archive.rb test_object.rb
|
|
13
|
+
end
|
data/tasks/test_gem.rake
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'English'
|
|
4
|
+
|
|
5
|
+
desc 'Build and install the git gem and run a sanity check'
|
|
6
|
+
task 'test:gem': :install do
|
|
7
|
+
output = `ruby -e "require 'git'; g = Git.open('.'); puts g.log.size"`.chomp
|
|
8
|
+
raise 'Gem test failed' unless $CHILD_STATUS.success?
|
|
9
|
+
raise 'Expected gem test to return an integer' unless output =~ /^\d+$/
|
|
10
|
+
|
|
11
|
+
puts 'Gem Test Succeeded'
|
|
12
|
+
end
|
data/tasks/yard.rake
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# YARD documentation for this project can NOT be built with JRuby or TruffleRuby.
|
|
4
|
+
# This project uses the redcarpet gem which can not be installed on JRuby.
|
|
5
|
+
#
|
|
6
|
+
unless RUBY_PLATFORM == 'java' || RUBY_ENGINE == 'truffleruby'
|
|
7
|
+
require 'yard'
|
|
8
|
+
|
|
9
|
+
YARD::Rake::YardocTask.new
|
|
10
|
+
CLEAN << '.yardoc'
|
|
11
|
+
CLEAN << 'doc'
|
|
12
|
+
|
|
13
|
+
require 'yardstick/rake/verify'
|
|
14
|
+
Yardstick::Rake::Verify.new(:'yardstick:coverage') do |t|
|
|
15
|
+
t.threshold = 50
|
|
16
|
+
t.require_exact_threshold = false
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
desc 'Run yardstick to check yard docs'
|
|
20
|
+
task :yardstick do
|
|
21
|
+
sh "yardstick 'lib/**/*.rb'"
|
|
22
|
+
end
|
|
23
|
+
end
|
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.0.
|
|
4
|
+
version: 4.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Scott Chacon and others
|
|
@@ -278,14 +278,19 @@ files:
|
|
|
278
278
|
- redesign/2_architecture_redesign.md
|
|
279
279
|
- redesign/3_architecture_implementation.md
|
|
280
280
|
- release-please-config.json
|
|
281
|
+
- tasks/gem_tasks.rake
|
|
282
|
+
- tasks/rubocop.rake
|
|
283
|
+
- tasks/test.rake
|
|
284
|
+
- tasks/test_gem.rake
|
|
285
|
+
- tasks/yard.rake
|
|
281
286
|
homepage: http://github.com/ruby-git/ruby-git
|
|
282
287
|
licenses:
|
|
283
288
|
- MIT
|
|
284
289
|
metadata:
|
|
285
290
|
homepage_uri: http://github.com/ruby-git/ruby-git
|
|
286
291
|
source_code_uri: http://github.com/ruby-git/ruby-git
|
|
287
|
-
changelog_uri: https://rubydoc.info/gems/git/4.0.
|
|
288
|
-
documentation_uri: https://rubydoc.info/gems/git/4.0.
|
|
292
|
+
changelog_uri: https://rubydoc.info/gems/git/4.0.6/file/CHANGELOG.md
|
|
293
|
+
documentation_uri: https://rubydoc.info/gems/git/4.0.6
|
|
289
294
|
rubygems_mfa_required: 'true'
|
|
290
295
|
rdoc_options: []
|
|
291
296
|
require_paths:
|