git 5.0.0.beta.5 → 5.0.1
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/.github/copilot-instructions.md +19 -73
- data/.gitignore +2 -0
- data/.husky/pre-commit +1 -1
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +46 -0
- data/README.md +53 -475
- data/UPGRADING.md +26 -0
- data/lib/git/branch.rb +5 -1
- data/lib/git/branch_info.rb +135 -76
- data/lib/git/branches.rb +1 -1
- data/lib/git/log.rb +12 -6
- data/lib/git/object.rb +5 -2
- data/lib/git/parsers/branch.rb +62 -64
- data/lib/git/parsers/remote.rb +162 -0
- data/lib/git/remote.rb +1 -22
- data/lib/git/remote_info.rb +146 -0
- data/lib/git/repository/branching.rb +57 -22
- data/lib/git/repository/committing.rb +25 -6
- data/lib/git/repository/context_helpers.rb +1 -1
- data/lib/git/repository/diffing.rb +2 -1
- data/lib/git/repository/factories.rb +10 -3
- data/lib/git/repository/merging.rb +5 -5
- data/lib/git/repository/remote_operations.rb +64 -8
- data/lib/git/repository/staging.rb +13 -4
- data/lib/git/repository/stashing.rb +1 -1
- data/lib/git/repository/status_operations.rb +1 -1
- data/lib/git/version.rb +1 -1
- data/lib/git.rb +8 -5
- data/redesign/branch_parse_refactor_plan.md +163 -0
- data/redesign/info_object_migration_plan.md +126 -0
- data/redesign/integration_test_analysis.md +521 -0
- data/redesign/remote_refactor_plan.md +164 -0
- metadata +10 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '08c43ba7ae36ad5b41333b4c5a4d1890ff32c32ad07074145ee75d71cde61b8d'
|
|
4
|
+
data.tar.gz: 1380d2019f14ec54339aec4d7fced236098072794747edd38de8559aee8a6b66
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe650cffb57c334881cda31e8f5a2e062c090bb1028c423647d5a429504c8d3ad96a6cb58812a3373ca0733f9c325e8dda3392bcd5ef4e53e561e80a17c5fa9d
|
|
7
|
+
data.tar.gz: c66b6ccf6e4644c09550d035c0b90ad1eb7dfbf91fc7509f8461329e6a33ac55d7324653a1c7770101a20156b4297304f14098a4fb8f97d48e7b6409b751b6d7
|
|
@@ -2,95 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
## Project Overview
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
working with branches/commits/tags/remotes, inspecting history and objects, and
|
|
8
|
-
performing all standard Git operations.
|
|
5
|
+
A Ruby gem providing an interface to Git repositories by wrapping system calls to the
|
|
6
|
+
`git` CLI.
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
Read the "Project Context" skill (`.github/skills/project-context/SKILL.md`) for
|
|
9
|
+
design philosophy, technical details, and compatibility requirements.
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
and
|
|
15
|
-
|
|
11
|
+
This project enforces Conventional Commits. See `.commitlintrc.yml` for allowed types
|
|
12
|
+
and scopes. Never use `#` in the commit message body. Doing so will cause
|
|
13
|
+
commitlint to incorrectly parse the commit message body as a footer. If you need to
|
|
14
|
+
refer to an issue in the body, use `issue 999` instead of `issue #999`. It is still
|
|
15
|
+
fine to use `#` in footer values such as `Closes: #999` or `Refs: #999`.
|
|
16
16
|
|
|
17
17
|
## Terminology & Writing Style
|
|
18
18
|
|
|
19
|
-
- Use American English
|
|
20
|
-
- **Version strings
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
precision matters ("removed in v5.0.0", "the foundation delivered in v5.0.0").
|
|
25
|
-
- `vN.0` — avoid; ambiguous between "minor version 0" and "shorthand for vN.0.0".
|
|
26
|
-
- **RuboCop** — correct capitalization when referring to the tool by name in prose,
|
|
27
|
-
documentation, or comments.
|
|
28
|
-
- **`rubocop`** — correct form when referring to the command-line executable or gem
|
|
29
|
-
name (e.g., `gem 'rubocop'`, `bundle exec rubocop`).
|
|
30
|
-
- **Rubocop** — incorrect; never use this form.
|
|
31
|
-
|
|
32
|
-
## Skill Loading
|
|
33
|
-
|
|
34
|
-
When a skill applies to a request, read the entire `SKILL.md` file before taking
|
|
35
|
-
any other action. Read from line 1 through EOF with no gaps. Simple code review
|
|
36
|
-
or explanation does not require a skill.
|
|
19
|
+
- Use American English.
|
|
20
|
+
- **Version strings:** Use `vN.x` for major series compatibility (e.g., `v4.x`) and
|
|
21
|
+
`vN.0.0` for specific releases (e.g., `v5.0.0`). Never use the ambiguous `vN.0`.
|
|
22
|
+
- **RuboCop:** Use `RuboCop` for prose and `rubocop` for CLI or gem names. Never use
|
|
23
|
+
`Rubocop`.
|
|
37
24
|
|
|
38
25
|
## Project Commands
|
|
39
26
|
|
|
40
27
|
| Purpose | Command |
|
|
41
28
|
| --- | --- |
|
|
42
|
-
| First-time setup | `bin/setup` |
|
|
43
|
-
| Run all tests and linters (CI-equivalent) | `bundle exec rake
|
|
44
|
-
| Run all tests
|
|
45
|
-
| Run
|
|
46
|
-
| Run RSpec
|
|
47
|
-
| Run RSpec integration tests | `bundle exec rake spec:integration:parallel` |
|
|
29
|
+
| First-time project or new worktree setup | `bin/setup` |
|
|
30
|
+
| Run all tests and linters (CI-equivalent) | `bundle exec rake` |
|
|
31
|
+
| Run all RSpec tests | `bundle exec rake spec` |
|
|
32
|
+
| Run RSpec unit tests | `bundle exec rake spec:unit` |
|
|
33
|
+
| Run RSpec integration tests | `bundle exec rake spec:integration` |
|
|
48
34
|
| Run a specific RSpec spec | `bundle exec rspec <path>` |
|
|
49
35
|
| Run linters | `bundle exec rake rubocop yard build` |
|
|
50
36
|
|
|
51
|
-
**Test suite:** `spec/` (RSpec) is the sole test suite — all new tests go here.
|
|
52
|
-
|
|
53
|
-
## Commit Conventions
|
|
54
|
-
|
|
55
|
-
This project uses [Conventional Commits](https://www.conventionalcommits.org/).
|
|
56
|
-
Automated releases via [release-please](https://github.com/googleapis/release-please).
|
|
57
|
-
|
|
58
|
-
**Format:** `type[optional scope][!]: description`
|
|
59
|
-
|
|
60
|
-
**Types:** `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`,
|
|
61
|
-
`revert`, `ci`, `build`
|
|
62
|
-
|
|
63
|
-
**Breaking changes:** Add `!` before `:` and a `BREAKING CHANGE: <description>`
|
|
64
|
-
footer.
|
|
65
|
-
|
|
66
|
-
**Version bumps:** breaking change → major; `feat` → minor; others → patch.
|
|
67
|
-
|
|
68
|
-
**Pre-commit hook:** Run `bin/setup` to install a validator.
|
|
69
|
-
|
|
70
37
|
## Branch & PR Strategy
|
|
71
38
|
|
|
72
39
|
| Target | When |
|
|
73
40
|
| --- | --- |
|
|
74
41
|
| `main` | New features, breaking changes, all active development |
|
|
75
42
|
| `4.x` | Security fixes and backward-compatible bug fixes for the v4.x series |
|
|
76
|
-
|
|
77
|
-
> **Never commit directly to `main` or `4.x`** — this rule must never be violated.
|
|
78
|
-
> Always check `git branch --show-current` before committing. If on a release branch,
|
|
79
|
-
> run `git switch -c <type>/<short-description>` first.
|
|
80
|
-
|
|
81
|
-
All changes go through a PR from a topic branch.
|
|
82
|
-
|
|
83
|
-
**Creating a PR:** Use `gh pr create`. Read `.github/pull_request_template.md` for
|
|
84
|
-
the body structure. Complete the [PR Readiness Review](skills/pr-readiness-review/SKILL.md)
|
|
85
|
-
skill first.
|
|
86
|
-
|
|
87
|
-
## Key Documents
|
|
88
|
-
|
|
89
|
-
| Document | Purpose |
|
|
90
|
-
| --- | --- |
|
|
91
|
-
| `CONTRIBUTING.md` | Design philosophy, contribution guidelines |
|
|
92
|
-
| `CHANGELOG.md` | Version history (auto-updated by release-please) |
|
|
93
|
-
| `MAINTAINERS.md` | Maintainer list and responsibilities |
|
|
94
|
-
| `AI_POLICY.md` | AI usage policy for this project |
|
|
95
|
-
| `redesign/` | Architecture redesign plans and implementation guide |
|
|
96
|
-
| `.github/skills/` | All Copilot skills |
|
data/.gitignore
CHANGED
data/.husky/pre-commit
CHANGED
|
@@ -7,7 +7,7 @@ protected_branches="main 4.x"
|
|
|
7
7
|
for protected in $protected_branches; do
|
|
8
8
|
if [ "$branch" = "$protected" ]; then
|
|
9
9
|
echo "ERROR: Direct commits to '$branch' are not allowed."
|
|
10
|
-
echo " Create a topic branch first: git switch -c <
|
|
10
|
+
echo " Create a topic branch first: git switch -c <type>/<short-description>"
|
|
11
11
|
exit 1
|
|
12
12
|
fi
|
|
13
13
|
done
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,52 @@
|
|
|
5
5
|
|
|
6
6
|
# Change Log
|
|
7
7
|
|
|
8
|
+
## [5.0.1](https://github.com/ruby-git/ruby-git/compare/v5.0.0...v5.0.1) (2026-07-30)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Other Changes
|
|
12
|
+
|
|
13
|
+
* Review and streamline AI agent instructions ([536eb86](https://github.com/ruby-git/ruby-git/commit/536eb865440da8c0e74de0dfc32828b82fc675db))
|
|
14
|
+
* Summarize v5.0.0 as architectural redesign in CHANGELOG ([712c93e](https://github.com/ruby-git/ruby-git/commit/712c93ea237490be3b037250af44cd6633baf68f))
|
|
15
|
+
|
|
16
|
+
## [5.0.0](https://github.com/ruby-git/ruby-git/compare/v4.1.2...v5.0.0) (2026-07-28)
|
|
17
|
+
|
|
18
|
+
v5.0.0 is a complete architectural redesign of the `git` gem. The monolithic
|
|
19
|
+
`Git::Base` and `Git::Lib` classes have been replaced by a layered design:
|
|
20
|
+
`Git::Commands::*` for git command execution, `Git::Repository` as the public
|
|
21
|
+
API surface, and dedicated parser classes. Most v4.x code requires **no
|
|
22
|
+
changes** — compatibility shims emit deprecation warnings pointing to the v5.x
|
|
23
|
+
equivalents.
|
|
24
|
+
|
|
25
|
+
For a full migration guide, including deprecated method renames and code
|
|
26
|
+
examples, see [UPGRADING.md](UPGRADING.md).
|
|
27
|
+
|
|
28
|
+
### ⚠ BREAKING CHANGES
|
|
29
|
+
|
|
30
|
+
* **`Git::Base` class removed; constant remains as a deprecated shim.**
|
|
31
|
+
`Git::Base.new` raises an error and `require 'git/base'` raises `LoadError`.
|
|
32
|
+
The `Git::Base` constant still exists as a deprecated module included in
|
|
33
|
+
`Git::Repository`, so `is_a?(Git::Base)` checks and monkeypatches continue to
|
|
34
|
+
work but emit deprecation warnings. Update explicit `Git::Base` class
|
|
35
|
+
references to use `Git::Repository`; the shim is removed in v6.0.0.
|
|
36
|
+
* **`Git::Lib` removed.** Calling `#lib` on a repository object returns `self`
|
|
37
|
+
with a deprecation warning (forwarding to `Git::Repository` methods where
|
|
38
|
+
possible), but `Git::Lib` itself no longer exists. Methods unique to
|
|
39
|
+
`Git::Lib` with no `Git::Repository` counterpart raise `NoMethodError`.
|
|
40
|
+
* **`Git.open`, `Git.bare`, `Git.clone`, and `Git.init` return `Git::Repository`
|
|
41
|
+
instead of `Git::Base`.** For most callers this is transparent. Code that
|
|
42
|
+
explicitly checks `is_a?(Git::Base)` must be updated to `is_a?(Git::Repository)`.
|
|
43
|
+
* **Unsupported options now raise `ArgumentError`.** Unknown keyword options
|
|
44
|
+
that were silently ignored in v4.x may now raise `ArgumentError`. Check
|
|
45
|
+
option names against the documented API when upgrading.
|
|
46
|
+
* **`Git::Log#object` is not a path limiter.** Use `Git::Log#path` to filter
|
|
47
|
+
log results by file path.
|
|
48
|
+
* **`Git::CommandLineResult` is deprecated** (removed in v6.0.0). Use
|
|
49
|
+
`Git::CommandLine::Result` instead.
|
|
50
|
+
|
|
51
|
+
For the full list of commits included in this release, see the
|
|
52
|
+
[v5.0.0 commit history](https://github.com/ruby-git/ruby-git/compare/v4.1.2...v5.0.0).
|
|
53
|
+
|
|
8
54
|
## [4.1.2](https://github.com/ruby-git/ruby-git/compare/v4.1.1...v4.1.2) (2026-01-10)
|
|
9
55
|
|
|
10
56
|
|