git 5.4.1 → 5.5.0

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: 3a2e69ae222061dc013d589215448053164f54e1b17c4e071b30d8fbe8035bcf
4
- data.tar.gz: b9615131c7573796ca6feed9becd6381b8f2aa142ce2e419c9669055f184f770
3
+ metadata.gz: 8a27bcb58894e06dd36f368c545d7800e95b2106122d222f98e43e4776117d38
4
+ data.tar.gz: a59267db8db5a09e843914400be509c574670d824882b8c7a0c80f3e38945238
5
5
  SHA512:
6
- metadata.gz: f3b1b79895b947c9b3209204e634b6069677f8e4054839b7744ee50d10bb09e66350d4e3041988718671c16bf75aca70ec35a50cfcd540cc52e69e3fc011450d
7
- data.tar.gz: 559b0e41cefa277f70c5e52ec8970b59b895f8ec8e808f2d207c49ea26592c45efe8c9d2b1233e3a1d3ed7ab77aae3ffa99d1802f51a842fce48a8f9fe81d3f3
6
+ metadata.gz: c60016fdfb41208d18ab63e36fb24a26c5a4cbc73978d44bab657ffb4ee8395d9c774311a752ae91e474b36d3b11d9eafb0c5ce1f54d8202068057d50b6c1093
7
+ data.tar.gz: 24656d7407eeea1ae1f92a8748eee1e65cdba4bafb9409ca0a96a819cfe7e3e2be4d9838fa3369464ccf908d5a7313de884a2e11c750f23664d88fcaa157f3dd
data/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@
5
5
 
6
6
  # Change Log
7
7
 
8
+ ## [5.5.0](https://github.com/ruby-git/ruby-git/compare/v5.4.1...v5.5.0) (2026-09-10)
9
+
10
+
11
+ ### Features
12
+
13
+ * **export:** Warn when the :remote option is passed to Git.export ([55a9810](https://github.com/ruby-git/ruby-git/commit/55a9810b7681a510781e55b17026ec6e13dcbfa5)), closes [#1820](https://github.com/ruby-git/ruby-git/issues/1820)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **export:** Drop the redundant checkout that broke Git.export for tags ([5e8422d](https://github.com/ruby-git/ruby-git/commit/5e8422d2361bff43959a0bba2254118087907a2a)), closes [#1815](https://github.com/ruby-git/ruby-git/issues/1815)
19
+
20
+
21
+ ### Other Changes
22
+
23
+ * **export:** Document the deprecated :remote option to Git.export ([3806d2b](https://github.com/ruby-git/ruby-git/commit/3806d2b5a6fdb167006097df83c783573024a521)), closes [#1820](https://github.com/ruby-git/ruby-git/issues/1820)
24
+ * Name the 5.x maintenance branch alongside 4.x ([ad30718](https://github.com/ruby-git/ruby-git/commit/ad30718a61cb89c343c84c71feb1c94cf3995f28))
25
+ * Run the CI, commitlint, release, and cache workflows for the 5.x branch ([7c3fd13](https://github.com/ruby-git/ruby-git/commit/7c3fd13994104c2c6b6564cc41d1e3c4e614255a))
26
+
8
27
  ## [5.4.1](https://github.com/ruby-git/ruby-git/compare/v5.4.0...v5.4.1) (2026-09-04)
9
28
 
10
29
 
data/CONTRIBUTING.md CHANGED
@@ -128,7 +128,7 @@ bin/setup
128
128
  3. Run `npm install` (when npm is available) to install the Conventional Commit
129
129
  `commit-msg` hook used by this project (Husky + commitlint). A separate
130
130
  `pre-commit` hook is also installed that blocks direct commits to the
131
- protected branches (`main`, `4.x`).
131
+ protected branches (`main`, `5.x`, `4.x`).
132
132
  4. Verify the toolchain by running `bundle exec rake --tasks`.
133
133
 
134
134
  `bin/setup` checks for [lychee](https://lychee.cli.rs) alongside Ruby, git, and
@@ -197,7 +197,7 @@ Once your pull request is ready for review, request a review from at least one
197
197
 
198
198
  During the review process, you may need to make additional commits; squash them.
199
199
  You will also need to rebase your branch onto the latest version of the target
200
- branch (e.g., `main` or `4.x`) before merging.
200
+ branch (e.g., `main`, `5.x`, or `4.x`) before merging.
201
201
 
202
202
  At least one approval from a project maintainer is required before your pull request
203
203
  can be merged. The maintainer is responsible for ensuring that the pull request meets
@@ -219,11 +219,13 @@ first keeps the review cycle short.
219
219
 
220
220
  ## Branch strategy
221
221
 
222
- This project maintains two active branches:
222
+ This project maintains `main` plus one maintenance branch for each supported previous
223
+ major series:
223
224
 
224
225
  - **`main`**: All development. It releases the next version of the gem, including
225
- the next major version.
226
- - **`4.x`**: The maintenance branch for the most recent previous major series. It
226
+ the next major version. Its next release is v6.0.0; every further v5.x release is
227
+ cut from `5.x`.
228
+ - **`5.x`** and **`4.x`**: The maintenance branches for the v5.x and v4.x series. Each
227
229
  receives bug fixes and security fixes, and backward-compatible features at the
228
230
  maintainers' discretion.
229
231
 
@@ -233,8 +235,10 @@ each major series is supported.
233
235
  When submitting a pull request:
234
236
 
235
237
  - **New features and breaking changes**: Target the `main` branch
236
- - **Bug fixes**: Target `main`, and maintainers will backport to `4.x` if applicable
237
- - **Security fixes**: Target both branches or `4.x` if the issue only affects v4.x
238
+ - **Bug fixes**: Target `main`, and maintainers will backport to the maintenance
239
+ branches if applicable
240
+ - **Security fixes**: Target `main` and every affected maintenance branch, or only a
241
+ maintenance branch if the issue affects that series alone
238
242
 
239
243
  Removing a deprecated API follows the
240
244
  [deprecation policy](.github/skills/breaking-change-analysis/SKILL.md#step-4-deprecation-policy):
@@ -981,9 +985,9 @@ skill. Follow it when writing or reviewing specs under `spec/unit/`.
981
985
 
982
986
  #### Test coverage policy
983
987
 
984
- **Every pull request to `main` must keep `bundle exec rake spec:unit` at 100% line
985
- coverage and 100% branch coverage of `lib/`.** CI fails the build when it drops
986
- below either threshold.
988
+ **Every pull request to `main` or `5.x` must keep `bundle exec rake spec:unit` at
989
+ 100% line coverage and 100% branch coverage of `lib/`.** CI fails the build when it
990
+ drops below either threshold.
987
991
 
988
992
  This is enforceable without being onerous because unit coverage in this project is
989
993
  deterministic: `lib/` has no Ruby-version, Ruby-engine, or platform conditionals, and
@@ -1088,8 +1092,8 @@ $ LIST_UNCOVERED_DETAIL=true bundle exec rake spec:unit
1088
1092
  $ open coverage/index.html
1089
1093
  ```
1090
1094
 
1091
- This policy applies to `main` only. The `4.x` maintenance branch predates it and is
1092
- not held to these thresholds.
1095
+ This policy applies to `main` and `5.x`. The `4.x` maintenance branch predates it and
1096
+ is not held to these thresholds.
1093
1097
 
1094
1098
  #### Unit tests vs integration tests
1095
1099
 
data/README.md CHANGED
@@ -447,12 +447,13 @@ are in [UPGRADING.md](UPGRADING.md#upgrading-to-v600). See
447
447
  ### Release support policy
448
448
 
449
449
  All development happens on `main`, which releases the next version of the gem,
450
- including the next major version.
450
+ including the next major version. The next release from `main` is v6.0.0. Every
451
+ further v5.x release is cut from `5.x`.
451
452
 
452
- The most recent previous major series is maintained on a branch named for that
453
- series, currently `4.x`. It receives bug fixes and security fixes, and
454
- backward-compatible features at the maintainers' discretion. Fixes land on `main`
455
- first and are backported, except a fix for a problem that exists only in the
453
+ Each supported previous major series is maintained on a branch named for that
454
+ series, currently `5.x` and `4.x`. These branches receive bug fixes and security
455
+ fixes, and backward-compatible features at the maintainers' discretion. Fixes land on
456
+ `main` first and are backported, except a fix for a problem that exists only in a
456
457
  maintenance branch, which targets that branch directly.
457
458
 
458
459
  Support for a major series ends when the second major after it is released. v4.x is
data/UPGRADING.md CHANGED
@@ -34,6 +34,7 @@ to update your code when upgrading from the preceding major version.
34
34
  - [`Git.clone` option renames](#gitclone-option-renames)
35
35
  - [`Git::Log` Enumerable interface deprecated](#gitlog-enumerable-interface-deprecated)
36
36
  - [`Git::Object::Commit#set_commit` deprecated](#gitobjectcommitset_commit-deprecated)
37
+ - [`Git.export` `:remote` option deprecated](#gitexport-remote-option-deprecated)
37
38
 
38
39
  ## Upgrading to v6.0.0
39
40
 
@@ -1117,4 +1118,21 @@ effect.
1117
1118
  |-----------------------------------------------------|-------------|
1118
1119
  | `commit.set_commit(data)` | `commit.from_data(data)` |
1119
1120
 
1121
+ #### `Git.export` `:remote` option deprecated
1122
+
1123
+ `Git.export` has always dropped a `:remote` option before calling `Git.clone`
1124
+ without telling the caller. Passing it now emits a deprecation warning. The option
1125
+ is still dropped, so the export itself is unchanged, and it will be removed in a
1126
+ future major release. Once it is removed, passing `:remote` raises `ArgumentError`
1127
+ like any other unsupported option (see [Unsupported options raise
1128
+ `ArgumentError`](#unsupported-options-raise-argumenterror)).
1129
+
1130
+ There is no replacement option. `:remote` renamed the clone's remote, and
1131
+ `Git.export` deletes the `.git` directory before returning, so the name was never
1132
+ observable in the result. Delete the option from the call.
1133
+
1134
+ | Deprecated call (works in v5.x, removed in a future major release) | Replacement |
1135
+ |--------------------------------------------------------------------|-------------|
1136
+ | `Git.export(url, dir, remote: name)` | `Git.export(url, dir)` |
1137
+
1120
1138
  ---
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.4.1'
7
+ VERSION = '5.5.0'
8
8
 
9
9
  # Represents a git version with major, minor, and patch components
10
10
  #
data/lib/git.rb CHANGED
@@ -327,25 +327,36 @@ module Git
327
327
  # Exports the current HEAD (or the specific branch given in <tt>options[:branch]</tt>)
328
328
  # into the given `directory`. It then removes all traces of git from the directory.
329
329
  #
330
- # Takes the same options as {Git.clone} except that `:remote` is silently ignored
331
- # and `:depth` defaults to 1.
330
+ # Takes the same options as {Git.clone} except that `:depth` defaults to 1 and
331
+ # `:remote` is ignored with a deprecation warning.
332
332
  #
333
333
  # @param repository_url [String, URI, Pathname] the repository to export from
334
334
  #
335
335
  # @param directory [String, Pathname, nil] the directory to export into; defaults to the
336
336
  # repository basename
337
337
  #
338
- # @param options [Hash] options forwarded to {Git.clone} (`:remote` is ignored;
339
- # `:depth` defaults to 1)
338
+ # @param options [Hash] options forwarded to {Git.clone} (`:depth` defaults to 1)
340
339
  #
341
- # @option options [String] :branch the branch or tag to export instead of HEAD
340
+ # @option options [String] :remote deprecated and ignored; delete it from the call.
341
+ # Passing it emits a deprecation warning and it will be removed in a future
342
+ # major release.
343
+ #
344
+ # @option options [String] :branch the branch or tag to export instead of HEAD.
345
+ # Give the short name (`main`, `v1.0.0`); a full ref path such as
346
+ # `refs/tags/v1.0.0` or a commit SHA is not accepted. Use `:revision` to
347
+ # export a SHA.
342
348
  #
343
349
  # @return [void]
344
350
  #
345
351
  def self.export(repository_url, directory = nil, options = {})
346
- options.delete(:remote)
352
+ if options.key?(:remote)
353
+ Git::Deprecation.warn(
354
+ 'The :remote option to Git.export is ignored, is deprecated, and will be removed in a future ' \
355
+ 'major release. Delete it from the call.'
356
+ )
357
+ options.delete(:remote)
358
+ end
347
359
  repo = clone(repository_url, directory, { depth: 1 }.merge(options))
348
- repo.checkout("origin/#{options[:branch]}") if options[:branch]
349
360
  FileUtils.rm_r File.join(repo.dir.to_s, '.git')
350
361
  end
351
362
 
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.4.1
4
+ version: 5.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon and others
@@ -548,8 +548,8 @@ licenses:
548
548
  metadata:
549
549
  homepage_uri: http://github.com/ruby-git/ruby-git
550
550
  source_code_uri: http://github.com/ruby-git/ruby-git
551
- changelog_uri: https://rubydoc.info/gems/git/5.4.1/file/CHANGELOG.md
552
- documentation_uri: https://rubydoc.info/gems/git/5.4.1
551
+ changelog_uri: https://rubydoc.info/gems/git/5.5.0/file/CHANGELOG.md
552
+ documentation_uri: https://rubydoc.info/gems/git/5.5.0
553
553
  rubygems_mfa_required: 'true'
554
554
  rdoc_options: []
555
555
  require_paths: