git 5.7.1 → 6.0.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 +4 -4
- data/CHANGELOG.md +132 -42
- data/CONTRIBUTING.md +44 -31
- data/README.md +138 -100
- data/UPGRADING.md +864 -259
- data/git.gemspec +6 -8
- data/lib/git/author_info.rb +1 -2
- data/lib/git/commands/base.rb +22 -2
- data/lib/git/commands/cat_file/raw.rb +0 -68
- data/lib/git/commands/maintenance/register.rb +0 -4
- data/lib/git/commands/maintenance/run.rb +0 -4
- data/lib/git/commands/maintenance/start.rb +0 -4
- data/lib/git/commands/maintenance/stop.rb +0 -4
- data/lib/git/commands/maintenance/unregister.rb +0 -4
- data/lib/git/commands/maintenance.rb +0 -2
- data/lib/git/commands/show_ref/exclude_existing.rb +1 -1
- data/lib/git/commands/show_ref/exists.rb +0 -5
- data/lib/git/commands/show_ref/list.rb +1 -1
- data/lib/git/commands/show_ref/verify.rb +1 -1
- data/lib/git/commands/show_ref.rb +1 -1
- data/lib/git/commands/worktree/repair.rb +0 -5
- data/lib/git/diff_path_status.rb +1 -1
- data/lib/git/encoding_utils.rb +25 -0
- data/lib/git/errors.rb +24 -18
- data/lib/git/factories.rb +361 -125
- data/lib/git/log.rb +3 -75
- data/lib/git/object.rb +4 -185
- data/lib/git/path_resolver.rb +104 -36
- data/lib/git/repository/branching.rb +21 -189
- data/lib/git/repository/committing.rb +0 -25
- data/lib/git/repository/context_helpers.rb +249 -155
- data/lib/git/repository/diffing.rb +2 -72
- data/lib/git/repository/merging.rb +32 -54
- data/lib/git/repository/object_operations.rb +120 -497
- data/lib/git/repository/remote_operations.rb +7 -219
- data/lib/git/repository/staging.rb +6 -184
- data/lib/git/repository/stashing.rb +126 -130
- data/lib/git/repository/status_operations.rb +1 -54
- data/lib/git/repository/worktree_operations.rb +30 -125
- data/lib/git/repository.rb +20 -299
- data/lib/git/system_call_guard.rb +95 -0
- data/lib/git/version.rb +1 -1
- data/lib/git.rb +47 -364
- metadata +24 -18
- data/lib/git/author.rb +0 -46
- data/lib/git/branch.rb +0 -693
- data/lib/git/branches.rb +0 -194
- data/lib/git/remote.rb +0 -191
- data/lib/git/stash.rb +0 -124
- data/lib/git/stashes.rb +0 -198
- data/lib/git/status.rb +0 -384
- data/lib/git/worktree.rb +0 -180
- data/lib/git/worktrees.rb +0 -152
data/README.md
CHANGED
|
@@ -15,10 +15,12 @@ Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?log
|
|
|
15
15
|
[](AI_POLICY.md)
|
|
16
16
|
[](LICENSE)
|
|
17
17
|
|
|
18
|
-
> **
|
|
19
|
-
>
|
|
20
|
-
>
|
|
21
|
-
> [
|
|
18
|
+
> **v6.0.0 is released.** It is a major release that removes the APIs deprecated
|
|
19
|
+
> during v5.x, raises the minimum Ruby version to 3.3 and the minimum git version
|
|
20
|
+
> to 2.43.0, and changes a few behaviors that had no deprecation path. See
|
|
21
|
+
> [Upgrading to v6.x](UPGRADING.md#upgrading-to-v6x) for the migration guide and
|
|
22
|
+
> [CHANGELOG.md](CHANGELOG.md) for full release notes. v5.x continues to receive
|
|
23
|
+
> fixes from the `5.x` branch.
|
|
22
24
|
|
|
23
25
|
- [Summary](#summary)
|
|
24
26
|
- [Install](#install)
|
|
@@ -38,6 +40,8 @@ Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?log
|
|
|
38
40
|
- [Deprecation policy](#deprecation-policy)
|
|
39
41
|
- [Release support policy](#release-support-policy)
|
|
40
42
|
- [Project announcements](#project-announcements)
|
|
43
|
+
- [2026-09-04: v5.x releases move to the 5.x branch](#2026-09-04-v5x-releases-move-to-the-5x-branch)
|
|
44
|
+
- [2026-09-04: Retired branches deleted](#2026-09-04-retired-branches-deleted)
|
|
41
45
|
- [2026-08-23: v5.x deprecations and the v6.0.0 roadmap](#2026-08-23-v5x-deprecations-and-the-v600-roadmap)
|
|
42
46
|
- [2026-07-28: v5.0.0 released](#2026-07-28-v500-released)
|
|
43
47
|
- [2026-01-07: AI policy introduced](#2026-01-07-ai-policy-introduced)
|
|
@@ -66,7 +70,7 @@ methods you can call on a repository object.
|
|
|
66
70
|
## Install
|
|
67
71
|
|
|
68
72
|
This gem is a wrapper around the `git` command line, so a `git` executable (version
|
|
69
|
-
2.
|
|
73
|
+
2.43.0 or greater) must be installed and on your `PATH`. See the [Git version support
|
|
70
74
|
policy](#git-version-support-policy) for details.
|
|
71
75
|
|
|
72
76
|
Install the gem and add to the application's Gemfile by executing:
|
|
@@ -146,12 +150,12 @@ Git.config.git_ssh = 'ssh -i ~/.ssh/id_rsa'
|
|
|
146
150
|
|
|
147
151
|
How SSH configuration is determined:
|
|
148
152
|
|
|
149
|
-
- If
|
|
150
|
-
|c| c.git_ssh = ... }`)
|
|
151
|
-
- If `git_ssh: nil
|
|
152
|
-
|
|
153
|
-
- If `git_ssh` is a non-empty string,
|
|
154
|
-
global config
|
|
153
|
+
- If the API call does not specify `git_ssh`, the gem uses the global config
|
|
154
|
+
(`Git.configure { |c| c.git_ssh = ... }`).
|
|
155
|
+
- If the call specifies `git_ssh: nil`, the gem disables SSH for that instance and
|
|
156
|
+
uses no SSH key or script.
|
|
157
|
+
- If `git_ssh` is a non-empty string, the gem uses it for that instance instead of
|
|
158
|
+
the global config.
|
|
155
159
|
|
|
156
160
|
You can also specify a custom SSH script on a per-repository basis:
|
|
157
161
|
|
|
@@ -167,8 +171,8 @@ git = Git.clone('git@github.com:user/repo.git', 'local-dir',
|
|
|
167
171
|
git = Git.init('new-repo', git_ssh: 'ssh -i /path/to/private_key')
|
|
168
172
|
```
|
|
169
173
|
|
|
170
|
-
This
|
|
171
|
-
|
|
174
|
+
This matters in multi-threaded applications where different repositories need
|
|
175
|
+
different SSH credentials.
|
|
172
176
|
|
|
173
177
|
### Git configuration
|
|
174
178
|
|
|
@@ -196,46 +200,15 @@ The [`Git::Repository`](https://rubydoc.info/gems/git/Git/Repository) reference
|
|
|
196
200
|
covers everything else: reading history, diffs, branches, remotes, worktrees,
|
|
197
201
|
staging, and low-level index and tree work. It documents every method and the object
|
|
198
202
|
type each one returns (such as `Git::Log`, `Git::Object::Commit`, `Git::Diff`,
|
|
199
|
-
`Git::
|
|
200
|
-
the full API of its result.
|
|
203
|
+
`Git::BranchInfo`, and `Git::WorktreeInfo`), so you can follow the links from a method
|
|
204
|
+
to the full API of its result.
|
|
201
205
|
|
|
202
206
|
## Errors raised by this gem
|
|
203
207
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
broad rescue cannot hide a deprecation your code opted to treat as fatal. The errors
|
|
209
|
-
described below come from Ruby's standard library and are not converted.
|
|
210
|
-
|
|
211
|
-
The gem's own filesystem operations, such as reading a `.git` pointer file,
|
|
212
|
-
creating a temporary file, or changing directory, do not convert operating system
|
|
213
|
-
errors. These can be raised as a bare `SystemCallError` (for example `Errno::ENOENT`
|
|
214
|
-
or `Errno::EACCES`) rather than `Git::Error`. Gzip compression in `archive` can
|
|
215
|
-
likewise raise a `Zlib::Error`. Rescue `SystemCallError` and `Zlib::Error` alongside
|
|
216
|
-
`Git::Error` if your code needs to handle them.
|
|
217
|
-
|
|
218
|
-
The affected methods are `Git.open` when the `.git` file is a gitdir pointer or the
|
|
219
|
-
path is relative, `Git.init`, `Git.bare`, and `Git.clone` when the path is relative,
|
|
220
|
-
`Git.export`, and these `Git::Repository` methods: `#chdir`, `#with_index`,
|
|
221
|
-
`#with_working`, `#with_temp_index`, `#with_temp_working`, `#set_index`,
|
|
222
|
-
`#set_working`, `#cat_file_contents` in block form, `#each_conflict`, `#conflicts`,
|
|
223
|
-
`#archive` (including the gzip step), `#repo_size`, and `#tag_sha` when it reads a
|
|
224
|
-
loose ref.
|
|
225
|
-
|
|
226
|
-
Any method that captures git output can also raise
|
|
227
|
-
`Encoding::ConverterNotFoundError` when the output contains a line whose detected
|
|
228
|
-
encoding, such as UTF-7, has no Ruby converter.
|
|
229
|
-
|
|
230
|
-
Starting with v6.0.0, the filesystem and gzip errors are raised as `Git::Error`
|
|
231
|
-
with the original error available through `cause`, except that `#tag_sha` falls
|
|
232
|
-
back to `git show-ref` instead of raising. Lines with no Ruby converter are
|
|
233
|
-
scrubbed instead of raising.
|
|
234
|
-
|
|
235
|
-
Rescue `Git::Error` to catch the runtime errors this gem raises itself, and add
|
|
236
|
-
`SystemCallError`, `Zlib::Error`, and `Encoding::ConverterNotFoundError` where the
|
|
237
|
-
paragraphs above say they can escape. Rescue a more specific subclass when you need
|
|
238
|
-
finer-grained handling.
|
|
208
|
+
The git gem raises only `ArgumentError` or errors that subclass `Git::Error`.
|
|
209
|
+
|
|
210
|
+
Rescue `Git::Error` to catch any runtime error raised by this gem, unless you need
|
|
211
|
+
more specific error handling.
|
|
239
212
|
|
|
240
213
|
```ruby
|
|
241
214
|
begin
|
|
@@ -245,6 +218,26 @@ rescue Git::Error => e
|
|
|
245
218
|
end
|
|
246
219
|
```
|
|
247
220
|
|
|
221
|
+
Operating system errors from the gem's own filesystem operations, such as reading
|
|
222
|
+
a `.git` pointer file or creating a temporary file, are raised as `Git::Error`.
|
|
223
|
+
The original `SystemCallError` is available through `cause`:
|
|
224
|
+
|
|
225
|
+
```ruby
|
|
226
|
+
begin
|
|
227
|
+
repo = Git.open('/path/to/repo')
|
|
228
|
+
rescue Git::Error => e
|
|
229
|
+
puts e.cause.class if e.cause.is_a?(SystemCallError) #=> Errno::EACCES
|
|
230
|
+
end
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
The promise covers errors the gem raises from its own operations. Two things pass
|
|
234
|
+
through unchanged. An error raised by a block your code passes to a method such as
|
|
235
|
+
`chdir` or `with_temp_working` is your error, and the gem does not relabel it. And
|
|
236
|
+
with the `raise` behavior described under [Deprecation policy](#deprecation-policy), a
|
|
237
|
+
deprecated call raises `ActiveSupport::DeprecationException`, which is intentionally
|
|
238
|
+
not a `Git::Error` so a broad rescue cannot hide a deprecation your code opted to
|
|
239
|
+
treat as fatal.
|
|
240
|
+
|
|
248
241
|
See [`Git::Error`](https://rubydoc.info/gems/git/Git/Error) for more information.
|
|
249
242
|
|
|
250
243
|
## Specifying and handling timeouts
|
|
@@ -252,13 +245,11 @@ See [`Git::Error`](https://rubydoc.info/gems/git/Git/Error) for more information
|
|
|
252
245
|
Set a timeout for git command line operations either globally or per method call for
|
|
253
246
|
methods that accept a `:timeout` parameter.
|
|
254
247
|
|
|
255
|
-
The timeout
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
When a command times out, the gem kills it with the `SIGKILL` signal and raises a
|
|
261
|
-
`Git::TimeoutError`. This error derives from `Git::SignaledError` and `Git::Error`.
|
|
248
|
+
The timeout is the number of seconds a `git` command may run before the gem sends
|
|
249
|
+
it `SIGKILL`. It must be a real, non-negative `Numeric`. When a command times out,
|
|
250
|
+
the gem kills it and raises `Git::TimeoutError`, which derives from
|
|
251
|
+
`Git::SignaledError` and `Git::Error`. The gem may hang if the `git` command does
|
|
252
|
+
not terminate after receiving `SIGKILL`.
|
|
262
253
|
|
|
263
254
|
If the timeout value is `0` or `nil`, no timeout is enforced.
|
|
264
255
|
|
|
@@ -292,7 +283,7 @@ begin
|
|
|
292
283
|
Git.clone(repo_url, timeout: 10)
|
|
293
284
|
rescue Git::TimeoutError => e
|
|
294
285
|
e.result.tap do |r|
|
|
295
|
-
r.class #=> Git::
|
|
286
|
+
r.class #=> Git::CommandLine::Result
|
|
296
287
|
r.status #=> #<Process::Status: pid 62173 SIGKILL (signal 9)>
|
|
297
288
|
r.status.timeout? #=> true
|
|
298
289
|
r.git_cmd # The git command ran as an array of strings
|
|
@@ -321,6 +312,17 @@ GIT_DEPRECATION_BEHAVIOR=silence
|
|
|
321
312
|
Accepted environment variable values are the behavior names supported by your
|
|
322
313
|
installed ActiveSupport version.
|
|
323
314
|
|
|
315
|
+
A deprecated method warns on every call, so a call site inside a loop produces one
|
|
316
|
+
warning per iteration. The gem does not deduplicate warnings. To quiet one call site
|
|
317
|
+
without hiding other deprecations, wrap it in `Git::Deprecation.silence`:
|
|
318
|
+
|
|
319
|
+
```ruby
|
|
320
|
+
Git::Deprecation.silence { repo.set_index(index_file) }
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
Prefer this over setting the behavior to `silence` globally, which also hides the
|
|
324
|
+
warnings for deprecations added in later releases.
|
|
325
|
+
|
|
324
326
|
If `GIT_DEPRECATION_BEHAVIOR` is set to an unsupported value, loading the gem
|
|
325
327
|
raises `ArgumentError` with the accepted behavior names.
|
|
326
328
|
|
|
@@ -329,7 +331,7 @@ documentation](https://api.rubyonrails.org/classes/ActiveSupport/Deprecation.htm
|
|
|
329
331
|
for more details.
|
|
330
332
|
|
|
331
333
|
Before upgrading the git gem to the next major version, follow the upgrade procedure
|
|
332
|
-
in [UPGRADING.md](UPGRADING.md#upgrading-to-
|
|
334
|
+
in [UPGRADING.md](UPGRADING.md#upgrading-to-v6x). It turns the warnings into errors so
|
|
333
335
|
that you cannot miss one.
|
|
334
336
|
|
|
335
337
|
For the full list of deprecated methods and their replacements, see
|
|
@@ -361,7 +363,7 @@ gem sets. It is unaffected by the locale: the behavior is identical under `en_US
|
|
|
361
363
|
and case-insensitive matching are unaffected on every platform.
|
|
362
364
|
|
|
363
365
|
**Workaround.** Perl-compatible regular expressions do match characters on Git for
|
|
364
|
-
Windows, so the
|
|
366
|
+
Windows, so the methods that can reach a PCRE engine accept an opt-in selector:
|
|
365
367
|
|
|
366
368
|
```ruby
|
|
367
369
|
repo.grep('^.PFEL', nil, perl_regexp: true) # matches on every platform
|
|
@@ -426,8 +428,18 @@ This gem is expected to function correctly on:
|
|
|
426
428
|
|
|
427
429
|
- All [non-EOL versions](https://www.ruby-lang.org/en/downloads/branches/) of the MRI
|
|
428
430
|
Ruby on Mac, Linux, and Windows
|
|
429
|
-
-
|
|
430
|
-
|
|
431
|
+
- JRuby and TruffleRuby on Linux, starting from the earliest release whose Ruby
|
|
432
|
+
compatibility target is at or above the oldest supported MRI version, unless a
|
|
433
|
+
newer release is otherwise needed (for example, when a release does not
|
|
434
|
+
implement a feature the gem depends on)
|
|
435
|
+
|
|
436
|
+
Consult the CI build matrix in
|
|
437
|
+
[`.github/workflows/continuous_integration.yml`](.github/workflows/continuous_integration.yml)
|
|
438
|
+
for the exact JRuby and TruffleRuby versions tested. Newer releases of each engine
|
|
439
|
+
are expected to work but are not tested.
|
|
440
|
+
|
|
441
|
+
Because the JRuby and TruffleRuby floors derive from the MRI floor, they move
|
|
442
|
+
whenever the oldest supported MRI version changes.
|
|
431
443
|
|
|
432
444
|
This project intends to support the latest version of JRuby on Windows once
|
|
433
445
|
the [process_executer](https://github.com/main-branch/process_executer) gem properly
|
|
@@ -436,21 +448,17 @@ supports subprocess status reporting on JRuby for Windows (see
|
|
|
436
448
|
|
|
437
449
|
### Git version support policy
|
|
438
450
|
|
|
439
|
-
This gem requires git
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
- The minimum git version necessary to support all features provided by this gem
|
|
443
|
-
- A reasonable balance between supporting older systems and using modern git
|
|
444
|
-
capabilities
|
|
445
|
-
- The practical limitations of testing across multiple git versions in CI
|
|
451
|
+
This gem requires git 2.43.0 or later, as the gemspec declares. The floor weighs the
|
|
452
|
+
git features the gem depends on, the systems users still run, and the git versions
|
|
453
|
+
CI can test.
|
|
446
454
|
|
|
447
|
-
Git 2.
|
|
448
|
-
|
|
449
|
-
|
|
455
|
+
Git 2.43.0 was released on November 20, 2023. The gem may work with an older git,
|
|
456
|
+
but the project does not test or support versions before 2.43.0. Users on an older
|
|
457
|
+
git should upgrade to at least 2.43.0.
|
|
450
458
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
459
|
+
A later major or minor release may raise the floor when the gem adopts a newer git
|
|
460
|
+
feature or when keeping compatibility with an old git becomes impractical. The
|
|
461
|
+
CHANGELOG and release notes document each such change.
|
|
454
462
|
|
|
455
463
|
### Deprecation policy
|
|
456
464
|
|
|
@@ -467,12 +475,16 @@ The recommended way to upgrade across a major version:
|
|
|
467
475
|
your test suite and, if possible, staging.
|
|
468
476
|
3. Fix each deprecation using the entries in [UPGRADING.md](UPGRADING.md) until the
|
|
469
477
|
suite is clean.
|
|
470
|
-
4.
|
|
478
|
+
4. Work through the changes that a clean run does not catch, listed in that major's
|
|
479
|
+
section of [UPGRADING.md](UPGRADING.md).
|
|
480
|
+
5. Upgrade to the next major release.
|
|
471
481
|
|
|
472
482
|
Because every deprecation warning is present in the last release of a major series,
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
483
|
+
steps 2 and 3 find every call to a deprecated API. A major release may also change a
|
|
484
|
+
behavior that had no deprecation path, such as the return type of a method that
|
|
485
|
+
keeps its name; step 4 covers those. The version-specific steps are in
|
|
486
|
+
[UPGRADING.md](UPGRADING.md#upgrading-to-v6x). See [Deprecations](#deprecations)
|
|
487
|
+
for how to configure the warnings.
|
|
476
488
|
|
|
477
489
|
### Release support policy
|
|
478
490
|
|
|
@@ -491,21 +503,47 @@ supported until v6.0.0 ships, and v5.x until v7.0.0.
|
|
|
491
503
|
|
|
492
504
|
## Project announcements
|
|
493
505
|
|
|
506
|
+
### 2026-09-04: v5.x releases move to the `5.x` branch
|
|
507
|
+
|
|
508
|
+
On September 4, 2026, we created the `5.x` branch from v5.4.1. Every further v5.x
|
|
509
|
+
release is cut from that branch, and the next release from `main` is v6.0.0. Nothing
|
|
510
|
+
changes for users of the gem: v5.x continues to receive bug fixes and security fixes
|
|
511
|
+
per the [Release support policy](#release-support-policy), and v4.x is supported
|
|
512
|
+
until v6.0.0 ships.
|
|
513
|
+
|
|
514
|
+
For contributors, fixes still land on `main` first and are backported to `5.x`. A fix
|
|
515
|
+
for a problem that exists only in v5.x targets `5.x` directly. See the
|
|
516
|
+
[branch strategy](CONTRIBUTING.md#branch-strategy) and
|
|
517
|
+
[issue #1717](https://github.com/ruby-git/ruby-git/issues/1717), the v6.0.0 roadmap.
|
|
518
|
+
|
|
519
|
+
### 2026-09-04: Retired branches deleted
|
|
520
|
+
|
|
521
|
+
On September 4, 2026, we deleted the `v1` and `master` branches. Neither had a
|
|
522
|
+
purpose: support for v1.x ended when v3.0.0 shipped, per the
|
|
523
|
+
[Release support policy](#release-support-policy), and `master` was the pre-rename
|
|
524
|
+
default branch, frozen since the rename to `main` on 2025-06-06. Every v1.x release
|
|
525
|
+
remains available as a tag, so nothing released was lost.
|
|
526
|
+
|
|
527
|
+
The branches that remain are the ones the release support policy describes: `main`
|
|
528
|
+
releases the next version, `4.x` maintains the v4.x series, and `5.x` maintains the
|
|
529
|
+
v5.x series. See [issue #1786](https://github.com/ruby-git/ruby-git/issues/1786) for
|
|
530
|
+
the details.
|
|
531
|
+
|
|
494
532
|
### 2026-08-23: v5.x deprecations and the v6.0.0 roadmap
|
|
495
533
|
|
|
496
|
-
The
|
|
534
|
+
The v6.0.0 plan is public. The remaining ActiveRecord-style
|
|
497
535
|
classes (`Git::Branch`, `Git::Remote`, `Git::Stash`, `Git::Worktree`,
|
|
498
536
|
`Git::Object::Tag`, `Git::Status`, `Git::Author`, and their collections) will be
|
|
499
537
|
deprecated during the v5.x series in favor of the immutable `*Info` value-object
|
|
500
538
|
APIs. v6.0.0 will remove each deprecated class once a normal v5.x release has carried
|
|
501
539
|
its deprecation warning and UPGRADING.md entry, per the
|
|
502
540
|
[Deprecation policy](#deprecation-policy). v6.0.0 will not ship until every planned
|
|
503
|
-
deprecation has shipped that way. v6.0.0 also raises the version floors
|
|
504
|
-
Ruby
|
|
541
|
+
deprecation has shipped that way. v6.0.0 also raises the version floors to git 2.43.0
|
|
542
|
+
and Ruby 3.3.
|
|
505
543
|
|
|
506
|
-
[Issue #1717](https://github.com/ruby-git/ruby-git/issues/1717) is the
|
|
507
|
-
|
|
508
|
-
|
|
544
|
+
[Issue #1717](https://github.com/ruby-git/ruby-git/issues/1717) is the roadmap
|
|
545
|
+
and tracks scope, order, and status. If your code uses the classes above, you can
|
|
546
|
+
start migrating now. Each deprecation names its replacement, and
|
|
509
547
|
[UPGRADING.md](UPGRADING.md) carries the migration guide as releases ship.
|
|
510
548
|
|
|
511
549
|
### 2026-07-28: v5.0.0 released
|
|
@@ -514,7 +552,7 @@ We have published [`git v5.0.0`](https://rubygems.org/gems/git/versions/5.0.0),
|
|
|
514
552
|
first stable release of the v5.x series, after five public beta releases in June and
|
|
515
553
|
July 2026.
|
|
516
554
|
|
|
517
|
-
|
|
555
|
+
v5.0.0 is a major release with breaking changes. See
|
|
518
556
|
[UPGRADING.md](UPGRADING.md) for the complete migration guide.
|
|
519
557
|
|
|
520
558
|
To install:
|
|
@@ -534,22 +572,22 @@ while emitting deprecation warnings that tell you what to migrate before v6.0.0.
|
|
|
534
572
|
|
|
535
573
|
### 2026-01-07: AI policy introduced
|
|
536
574
|
|
|
537
|
-
We have adopted
|
|
538
|
-
AI-assisted contributions.
|
|
539
|
-
|
|
540
|
-
requirements.
|
|
575
|
+
We have adopted an [AI Policy](AI_POLICY.md) that sets expectations for
|
|
576
|
+
AI-assisted contributions. Read it before opening a PR. It asks that you understand
|
|
577
|
+
every change you submit, that the work meets the project's quality bar, and that it
|
|
578
|
+
respects licensing requirements.
|
|
541
579
|
|
|
542
|
-
|
|
543
|
-
|
|
580
|
+
The policy states principles rather than a checklist, so it is short to read and
|
|
581
|
+
still sets clear expectations.
|
|
544
582
|
|
|
545
583
|
### 2025-07-09: Architectural redesign
|
|
546
584
|
|
|
547
585
|
On this date we announced an architectural redesign of the git gem. The architecture
|
|
548
|
-
at the time was difficult to maintain and
|
|
549
|
-
|
|
550
|
-
|
|
586
|
+
at the time was difficult to maintain and change. The redesign replaced it with a
|
|
587
|
+
three-layer structure of commands, parsers, and a `Git::Repository` facade, which is
|
|
588
|
+
easier to test because each layer can be exercised on its own.
|
|
551
589
|
|
|
552
|
-
|
|
590
|
+
The redesign shipped in v5.0.0 and is complete. `Git::Base` and `Git::Lib` are
|
|
553
591
|
gone, along with the `g.lib` accessor. See [UPGRADING.md](UPGRADING.md) for what
|
|
554
592
|
changed and how to migrate.
|
|
555
593
|
|
|
@@ -567,10 +605,10 @@ to new code live in [`.github/skills/`](.github/skills/).
|
|
|
567
605
|
|
|
568
606
|
### 2025-07-07: We now use RuboCop
|
|
569
607
|
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
contributions must follow the style
|
|
573
|
-
|
|
608
|
+
The `ruby-git` project has adopted [RuboCop](https://rubocop.org/) as its static
|
|
609
|
+
code analyzer and formatter so that contributions share one style. All new
|
|
610
|
+
contributions must follow the style rules the project's RuboCop configuration
|
|
611
|
+
enforces.
|
|
574
612
|
|
|
575
613
|
Run RuboCop from the project's Rakefile:
|
|
576
614
|
|