git 5.0.0.beta.4 → 5.0.0.beta.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24512a581eb9da75ed5026f0579869d4ae549a3c028d94a4d97edb5b5b063ac5
4
- data.tar.gz: 86ce5ddca8a1bb92802afbb61e84e7b186a782222f8ff8fa7e6ee14d57020779
3
+ metadata.gz: dd627f8c88fec64de6a0bd1f809fec1415ec503b3e2a79cf0701d7dcea27f7af
4
+ data.tar.gz: 9d40f48b1b9fc7b9fee24b8092d540e32221b9cf8f63e01f8c600141b39382f1
5
5
  SHA512:
6
- metadata.gz: fff5622c9a132467a43459c4ea2c5ad059d8e50a18ac7d45b2a7af37abfd37c0ed2e8cc834b654f2cabd99e6a53330a47f0b8e626cbf0e67433ff42f376bf8e0
7
- data.tar.gz: 927adb62c1023e826cf76da5522fc7b5fb5c182bfec637e0c3d191967ad148b1b134403f7151a2f66460536bcf0ba4383c9daf40d2cc3a730e4aecb2fa97555a
6
+ metadata.gz: 9feb3e0cecb9bf51472690c3824719da82e66711466a83e5a3328d209c4a1bdebb134c5ed7a26c023097dfca6d78234b835f2abab08e6a07d714699c79e608e8
7
+ data.tar.gz: fa8013e041f2e7d73d73c1ddc18bb9e9d5b59e5d960154e1af1da759401782c288cce90646bf3fa4914738415611ee07dcdbcd7b314958bf85ba06c1fe190cb4
data/README.md CHANGED
@@ -31,6 +31,7 @@ Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?log
31
31
  - [Ruby Version Support Policy](#ruby-version-support-policy)
32
32
  - [Git Version Support Policy](#git-version-support-policy)
33
33
  - [📢 Project Announcements 📢](#-project-announcements-)
34
+ - [2026-07-13: v5.0.0.beta.5 Released](#2026-07-13-v500beta5-released)
34
35
  - [2026-07-11: v5.0.0.beta.4 Released](#2026-07-11-v500beta4-released)
35
36
  - [2026-06-26: v5.0.0.beta.3 Released](#2026-06-26-v500beta3-released)
36
37
  - [2026-06-25: v5.0.0.beta.2 Released](#2026-06-25-v500beta2-released)
@@ -664,6 +665,37 @@ notes.
664
665
 
665
666
  ## 📢 Project Announcements 📢
666
667
 
668
+ ### 2026-07-13: v5.0.0.beta.5 Released
669
+
670
+ We have published
671
+ [`git v5.0.0.beta.5`](https://rubygems.org/gems/git/versions/5.0.0.beta.5) as our
672
+ fifth pre-release.
673
+
674
+ The main user-visible change is a temporary compatibility shim for users who
675
+ monkeypatch `Git::Base`. In v5.0.0, `Git::Base` has been replaced by
676
+ `Git::Repository`; the shim forwards methods defined on `Git::Base` to repository
677
+ instances and emits deprecation warnings so applications can migrate those patches
678
+ to `Git::Repository` before v6.0.0.
679
+
680
+ **To try the beta**, add the pre-release version to your `Gemfile`:
681
+
682
+ ```ruby
683
+ gem 'git', '~> 5.0.0.beta'
684
+ ```
685
+
686
+ Or install it directly:
687
+
688
+ ```sh
689
+ gem install git --pre
690
+ ```
691
+
692
+ The intent is full backward compatibility with v4.x, but given the size and scope of
693
+ the redesign, some incompatibilities may exist. Please give the latest beta a try and
694
+ [open an issue](https://github.com/ruby-git/ruby-git/issues) if you hit anything
695
+ unexpected — your feedback helps us ship a solid v5.0.0.
696
+
697
+ See [UPGRADING.md](UPGRADING.md) for a full list of deprecations and breaking changes.
698
+
667
699
  ### 2026-07-11: v5.0.0.beta.4 Released
668
700
 
669
701
  The architectural redesign is **feature complete** and we have published
data/UPGRADING.md CHANGED
@@ -9,7 +9,9 @@ to update your code when upgrading from the preceding major version.
9
9
  - [Breaking changes](#breaking-changes)
10
10
  - [`Git::Base` removed](#gitbase-removed)
11
11
  - [Return type of `Git.open`, `Git.clone`, `Git.init`, `Git.bare`](#return-type-of-gitopen-gitclone-gitinit-gitbare)
12
+ - [Unsupported options raise `ArgumentError`](#unsupported-options-raise-argumenterror)
12
13
  - [`Git::Lib` removed](#gitlib-removed)
14
+ - [`Git::Log#object` is not a path limiter](#gitlogobject-is-not-a-path-limiter)
13
15
  - [`Git::CommandLineResult` deprecated](#gitcommandlineresult-deprecated)
14
16
  - [Deprecated methods](#deprecated-methods)
15
17
  - [Facade method renames](#facade-method-renames)
@@ -45,6 +47,8 @@ For information on how to suppress or configure deprecation warnings, see the
45
47
  | `Git::Base` removed | Hard break | High for code that references it by name | Replace with `Git::Repository` (returned by `Git.open` etc.) |
46
48
  | `Git::Lib` removed | Hard break | High for `.lib.*` callers | Use the equivalent method directly on the repo object (see table below) |
47
49
  | `Git.open` etc. return `Git::Repository` (not `Git::Base`) | Hard break | Low for most callers; breaks `is_a?(Git::Base)` | Update type checks and update `be_a(Git::Base)` in tests |
50
+ | Unsupported options now raise `ArgumentError` | Behavior change | Medium for code passing unknown or misspelled options | Check option names against the documented API |
51
+ | `Git::Log#object` is not a path limiter | Behavior change | Medium for code that used `object(path)` to filter logs by path | Use `Git::Log#path` for path filtering |
48
52
  | `Git::CommandLineResult` deprecated | Deprecation (removed in v6.0.0) | Low; only affects code that references the constant by name | Use `Git::CommandLine::Result` instead |
49
53
 
50
54
  ---
@@ -114,6 +118,27 @@ construct a repository object.
114
118
 
115
119
  ---
116
120
 
121
+ #### Unsupported options raise `ArgumentError`
122
+
123
+ v5.x validates options more strictly for factory methods and command APIs.
124
+ Unknown options that were silently ignored in v4.x may now raise
125
+ `ArgumentError`. Check option names against the documented API when upgrading,
126
+ especially for calls that pass keyword options through helper methods or shared
127
+ option hashes.
128
+
129
+ For example, `Git.clone` supports `log:`, not `logger:`. A misspelled or
130
+ unsupported option that v4.x ignored must be corrected:
131
+
132
+ ```ruby
133
+ # v4.x — silently ignored; did not configure clone logging
134
+ Git.clone(url, path, logger: logger)
135
+
136
+ # v5.x — use the documented option name
137
+ Git.clone(url, path, log: logger)
138
+ ```
139
+
140
+ ---
141
+
117
142
  #### `Git::Lib` removed
118
143
 
119
144
  The object returned by `Git.open`, `Git.clone`, `Git.init`, and `Git.bare` previously
@@ -211,6 +236,30 @@ helpers with no plausible external use. They have no replacement in v5.0.0:
211
236
 
212
237
  ---
213
238
 
239
+ #### `Git::Log#object` is not a path limiter
240
+
241
+ In previous 4.x releases, some uses of `Git::Log#object(path)` could appear to
242
+ filter log output by path when combined with `#between` or other revision range
243
+ options. This relied on ambiguous `git log` argument handling and was not the
244
+ intended API for path filtering.
245
+
246
+ In v5.x, `Git::Log#object` should be treated as a revision expression. When both
247
+ `#object` and `#between` are specified, `#between` takes precedence. Code that
248
+ used `#object` to limit commits to a path should use `#path` instead.
249
+
250
+ ```ruby
251
+ # v4.x — ambiguous; could appear to filter commits touching this path
252
+ git.log(500).object('cookbooks/mycookbook').between('1.0.0', 'HEAD').execute
253
+
254
+ # v5.x — use #path for path filtering
255
+ git.log(500).path('cookbooks/mycookbook').between('1.0.0', 'HEAD').execute
256
+
257
+ # #object remains appropriate for revision expressions
258
+ git.log.object('HEAD~10..HEAD').execute
259
+ ```
260
+
261
+ ---
262
+
214
263
  #### `Git::CommandLineResult` deprecated
215
264
 
216
265
  `Git::CommandLineResult` was an alias for `Git::CommandLine::Result` introduced
data/lib/git/version.rb CHANGED
@@ -4,7 +4,7 @@ module Git
4
4
  # The current gem version
5
5
  #
6
6
  # @return [String] the current gem version
7
- VERSION = '5.0.0.beta.4'
7
+ VERSION = '5.0.0.beta.5'
8
8
 
9
9
  # Represents a git version with major, minor, and patch components
10
10
  #
data/lib/git.rb CHANGED
@@ -110,6 +110,43 @@ module Git
110
110
  #
111
111
  MINIMUM_GIT_VERSION = Version.parse('2.28.0')
112
112
 
113
+ # Compatibility shim for code that monkeypatches the `Git::Base` class from
114
+ # versions prior to 5.0.0.
115
+ #
116
+ # `Git::Base` is a module included in {Git::Repository}, so any instance
117
+ # methods added to `Git::Base` are automatically available on
118
+ # {Git::Repository} instances. A deprecation warning is emitted for each
119
+ # method added, encouraging migration to {Git::Repository}.
120
+ #
121
+ # @example Monkeypatching Git::Base (deprecated)
122
+ # module Git::Base
123
+ # def my_helper = "hello"
124
+ # end
125
+ # Git.open('.').my_helper # => "hello"
126
+ #
127
+ # @deprecated Define instance methods on {Git::Repository} instead.
128
+ #
129
+ # @api public
130
+ Base = Module.new do
131
+ # Emit a deprecation warning each time a method is defined in Git::Base so
132
+ # that authors of monkeypatches are nudged toward Git::Repository.
133
+ def self.method_added(method_name)
134
+ Git::Deprecation.warn(
135
+ 'Monkeypatching Git::Base is deprecated and will be removed in v6.0.0. ' \
136
+ "Define #{method_name} in Git::Repository instead."
137
+ )
138
+ super
139
+ end
140
+
141
+ # Raise a clear error when legacy code calls Git::Base.new directly.
142
+ def self.new(...)
143
+ raise NoMethodError,
144
+ 'Git::Base.new is not supported. Use Git.open, Git.clone, or Git.init instead.'
145
+ end
146
+ end
147
+
148
+ Repository.include(Base)
149
+
113
150
  # Intercept the first lookup of the deprecated `Git::CommandLineResult` constant
114
151
  #
115
152
  # When `name` is `:CommandLineResult`, caches and returns {Git::CommandLine::Result}
@@ -0,0 +1,44 @@
1
+ WITH matching_dependencies AS (
2
+ SELECT
3
+ dependent_gem.name AS dependent_gem_name,
4
+ dependent_version.number AS dependent_version_number,
5
+ dependent_version.canonical_number AS dependent_version_canonical_number,
6
+ COALESCE(dependent_version.built_at, dependent_version.created_at) AS dependent_version_released_at,
7
+ dependencies.requirements,
8
+ COALESCE(linksets.code, linksets.home) AS url
9
+ FROM rubygems target_gem
10
+ JOIN dependencies
11
+ ON dependencies.rubygem_id = target_gem.id
12
+ JOIN versions dependent_version
13
+ ON dependent_version.id = dependencies.version_id
14
+ JOIN rubygems dependent_gem
15
+ ON dependent_gem.id = dependent_version.rubygem_id
16
+ LEFT JOIN linksets
17
+ ON linksets.rubygem_id = dependent_gem.id
18
+ WHERE target_gem.name = 'git'
19
+ AND (
20
+ dependencies.requirements LIKE '~> 4.%'
21
+ OR dependencies.requirements LIKE '>= %'
22
+ )
23
+ ),
24
+ latest_dependencies AS (
25
+ SELECT DISTINCT ON (dependent_gem_name)
26
+ dependent_gem_name,
27
+ dependent_version_number,
28
+ dependent_version_released_at,
29
+ requirements,
30
+ url
31
+ FROM matching_dependencies
32
+ ORDER BY
33
+ dependent_gem_name,
34
+ dependent_version_canonical_number DESC NULLS LAST,
35
+ dependent_version_number DESC
36
+ )
37
+ SELECT
38
+ dependent_gem_name,
39
+ dependent_version_number,
40
+ dependent_version_released_at,
41
+ requirements,
42
+ url
43
+ FROM latest_dependencies
44
+ ORDER BY dependent_version_released_at DESC;
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: 5.0.0.beta.4
4
+ version: 5.0.0.beta.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon and others
@@ -607,6 +607,7 @@ files:
607
607
  - redesign/config_design.rb
608
608
  - redesign/index.md
609
609
  - redesign/phase-4-step-b-test-audit.tsv
610
+ - redesign/reverse_dependencies.sql
610
611
  - tasks/gem_tasks.rake
611
612
  - tasks/npm_tasks.rake
612
613
  - tasks/rspec.rake
@@ -619,8 +620,8 @@ licenses:
619
620
  metadata:
620
621
  homepage_uri: http://github.com/ruby-git/ruby-git
621
622
  source_code_uri: http://github.com/ruby-git/ruby-git
622
- changelog_uri: https://rubydoc.info/gems/git/5.0.0.beta.4/file/CHANGELOG.md
623
- documentation_uri: https://rubydoc.info/gems/git/5.0.0.beta.4
623
+ changelog_uri: https://rubydoc.info/gems/git/5.0.0.beta.5/file/CHANGELOG.md
624
+ documentation_uri: https://rubydoc.info/gems/git/5.0.0.beta.5
624
625
  rubygems_mfa_required: 'true'
625
626
  rdoc_options: []
626
627
  require_paths: