git 4.4.6 → 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/.yardopts +1 -0
- data/CHANGELOG.md +348 -39
- data/CONTRIBUTING.md +1014 -144
- data/README.md +386 -504
- data/UPGRADING.md +1822 -0
- data/git.gemspec +102 -22
- data/lib/git/author_info.rb +65 -0
- data/lib/git/branch_delete_failure.rb +34 -0
- data/lib/git/branch_delete_result.rb +66 -0
- data/lib/git/branch_info.rb +237 -0
- data/lib/git/command_line/base.rb +247 -0
- data/lib/git/command_line/capturing.rb +308 -0
- data/lib/git/command_line/result.rb +88 -0
- data/lib/git/command_line/streaming.rb +236 -0
- data/lib/git/command_line.rb +45 -323
- data/lib/git/commands/add.rb +139 -0
- data/lib/git/commands/am/abort.rb +43 -0
- data/lib/git/commands/am/apply.rb +263 -0
- data/lib/git/commands/am/continue.rb +43 -0
- data/lib/git/commands/am/quit.rb +43 -0
- data/lib/git/commands/am/retry.rb +49 -0
- data/lib/git/commands/am/show_current_patch.rb +64 -0
- data/lib/git/commands/am/skip.rb +42 -0
- data/lib/git/commands/am.rb +33 -0
- data/lib/git/commands/apply.rb +242 -0
- data/lib/git/commands/archive/list_formats.rb +46 -0
- data/lib/git/commands/archive.rb +145 -0
- data/lib/git/commands/arguments.rb +4521 -0
- data/lib/git/commands/base.rb +522 -0
- data/lib/git/commands/branch/copy.rb +102 -0
- data/lib/git/commands/branch/create.rb +177 -0
- data/lib/git/commands/branch/delete.rb +88 -0
- data/lib/git/commands/branch/list.rb +178 -0
- data/lib/git/commands/branch/move.rb +102 -0
- data/lib/git/commands/branch/set_upstream.rb +86 -0
- data/lib/git/commands/branch/show_current.rb +49 -0
- data/lib/git/commands/branch/unset_upstream.rb +53 -0
- data/lib/git/commands/branch.rb +34 -0
- data/lib/git/commands/cat_file/batch.rb +385 -0
- data/lib/git/commands/cat_file/filtered.rb +105 -0
- data/lib/git/commands/cat_file/raw.rb +203 -0
- data/lib/git/commands/cat_file.rb +49 -0
- data/lib/git/commands/checkout/branch.rb +153 -0
- data/lib/git/commands/checkout/files.rb +116 -0
- data/lib/git/commands/checkout.rb +38 -0
- data/lib/git/commands/checkout_index.rb +106 -0
- data/lib/git/commands/clean.rb +102 -0
- data/lib/git/commands/clone.rb +241 -0
- data/lib/git/commands/commit.rb +273 -0
- data/lib/git/commands/commit_tree.rb +101 -0
- data/lib/git/commands/config_option_syntax/add.rb +86 -0
- data/lib/git/commands/config_option_syntax/get.rb +121 -0
- data/lib/git/commands/config_option_syntax/get_all.rb +118 -0
- data/lib/git/commands/config_option_syntax/get_color.rb +95 -0
- data/lib/git/commands/config_option_syntax/get_color_bool.rb +96 -0
- data/lib/git/commands/config_option_syntax/get_regexp.rb +119 -0
- data/lib/git/commands/config_option_syntax/get_urlmatch.rb +111 -0
- data/lib/git/commands/config_option_syntax/list.rb +111 -0
- data/lib/git/commands/config_option_syntax/remove_section.rb +79 -0
- data/lib/git/commands/config_option_syntax/rename_section.rb +83 -0
- data/lib/git/commands/config_option_syntax/replace_all.rb +109 -0
- data/lib/git/commands/config_option_syntax/set.rb +119 -0
- data/lib/git/commands/config_option_syntax/unset.rb +92 -0
- data/lib/git/commands/config_option_syntax/unset_all.rb +94 -0
- data/lib/git/commands/config_option_syntax.rb +56 -0
- data/lib/git/commands/describe.rb +156 -0
- data/lib/git/commands/diff.rb +657 -0
- data/lib/git/commands/diff_files.rb +519 -0
- data/lib/git/commands/diff_index.rb +499 -0
- data/lib/git/commands/fetch.rb +354 -0
- data/lib/git/commands/fsck.rb +138 -0
- data/lib/git/commands/gc.rb +134 -0
- data/lib/git/commands/grep.rb +339 -0
- data/lib/git/commands/init.rb +101 -0
- data/lib/git/commands/log.rb +634 -0
- data/lib/git/commands/ls_files.rb +195 -0
- data/lib/git/commands/ls_remote.rb +161 -0
- data/lib/git/commands/ls_tree.rb +135 -0
- data/lib/git/commands/maintenance/register.rb +73 -0
- data/lib/git/commands/maintenance/run.rb +105 -0
- data/lib/git/commands/maintenance/start.rb +67 -0
- data/lib/git/commands/maintenance/stop.rb +56 -0
- data/lib/git/commands/maintenance/unregister.rb +80 -0
- data/lib/git/commands/maintenance.rb +29 -0
- data/lib/git/commands/merge/abort.rb +44 -0
- data/lib/git/commands/merge/continue.rb +44 -0
- data/lib/git/commands/merge/quit.rb +46 -0
- data/lib/git/commands/merge/start.rb +250 -0
- data/lib/git/commands/merge.rb +28 -0
- data/lib/git/commands/merge_base.rb +91 -0
- data/lib/git/commands/mv.rb +82 -0
- data/lib/git/commands/name_rev.rb +119 -0
- data/lib/git/commands/pull.rb +382 -0
- data/lib/git/commands/push.rb +251 -0
- data/lib/git/commands/read_tree.rb +154 -0
- data/lib/git/commands/remote/add.rb +96 -0
- data/lib/git/commands/remote/get_url.rb +68 -0
- data/lib/git/commands/remote/list.rb +56 -0
- data/lib/git/commands/remote/prune.rb +63 -0
- data/lib/git/commands/remote/remove.rb +52 -0
- data/lib/git/commands/remote/rename.rb +76 -0
- data/lib/git/commands/remote/set_branches.rb +70 -0
- data/lib/git/commands/remote/set_head.rb +89 -0
- data/lib/git/commands/remote/set_url.rb +78 -0
- data/lib/git/commands/remote/set_url_add.rb +70 -0
- data/lib/git/commands/remote/set_url_delete.rb +71 -0
- data/lib/git/commands/remote/show.rb +77 -0
- data/lib/git/commands/remote/update.rb +79 -0
- data/lib/git/commands/remote.rb +42 -0
- data/lib/git/commands/repack.rb +281 -0
- data/lib/git/commands/reset.rb +154 -0
- data/lib/git/commands/rev_parse.rb +304 -0
- data/lib/git/commands/revert/abort.rb +45 -0
- data/lib/git/commands/revert/continue.rb +62 -0
- data/lib/git/commands/revert/quit.rb +47 -0
- data/lib/git/commands/revert/skip.rb +44 -0
- data/lib/git/commands/revert/start.rb +158 -0
- data/lib/git/commands/revert.rb +29 -0
- data/lib/git/commands/rm.rb +113 -0
- data/lib/git/commands/show.rb +632 -0
- data/lib/git/commands/show_ref/exclude_existing.rb +119 -0
- data/lib/git/commands/show_ref/exists.rb +75 -0
- data/lib/git/commands/show_ref/list.rb +149 -0
- data/lib/git/commands/show_ref/verify.rb +122 -0
- data/lib/git/commands/show_ref.rb +42 -0
- data/lib/git/commands/stash/apply.rb +81 -0
- data/lib/git/commands/stash/branch.rb +67 -0
- data/lib/git/commands/stash/clear.rb +43 -0
- data/lib/git/commands/stash/create.rb +60 -0
- data/lib/git/commands/stash/drop.rb +73 -0
- data/lib/git/commands/stash/list.rb +43 -0
- data/lib/git/commands/stash/pop.rb +87 -0
- data/lib/git/commands/stash/push.rb +112 -0
- data/lib/git/commands/stash/show.rb +158 -0
- data/lib/git/commands/stash/store.rb +72 -0
- data/lib/git/commands/stash.rb +38 -0
- data/lib/git/commands/status.rb +174 -0
- data/lib/git/commands/symbolic_ref/delete.rb +72 -0
- data/lib/git/commands/symbolic_ref/read.rb +99 -0
- data/lib/git/commands/symbolic_ref/update.rb +79 -0
- data/lib/git/commands/symbolic_ref.rb +38 -0
- data/lib/git/commands/tag/create.rb +142 -0
- data/lib/git/commands/tag/delete.rb +57 -0
- data/lib/git/commands/tag/list.rb +146 -0
- data/lib/git/commands/tag/verify.rb +71 -0
- data/lib/git/commands/tag.rb +26 -0
- data/lib/git/commands/update_ref/batch.rb +145 -0
- data/lib/git/commands/update_ref/delete.rb +90 -0
- data/lib/git/commands/update_ref/update.rb +103 -0
- data/lib/git/commands/update_ref.rb +42 -0
- data/lib/git/commands/version.rb +60 -0
- data/lib/git/commands/worktree/add.rb +139 -0
- data/lib/git/commands/worktree/list.rb +64 -0
- data/lib/git/commands/worktree/lock.rb +58 -0
- data/lib/git/commands/worktree/management_base.rb +51 -0
- data/lib/git/commands/worktree/move.rb +66 -0
- data/lib/git/commands/worktree/prune.rb +67 -0
- data/lib/git/commands/worktree/remove.rb +63 -0
- data/lib/git/commands/worktree/repair.rb +71 -0
- data/lib/git/commands/worktree/unlock.rb +47 -0
- data/lib/git/commands/worktree.rb +43 -0
- data/lib/git/commands/write_tree.rb +68 -0
- data/lib/git/commands.rb +88 -0
- data/lib/git/config.rb +64 -1
- data/lib/git/config_entry_info.rb +106 -0
- data/lib/git/configuring.rb +795 -0
- data/lib/git/detached_head_info.rb +57 -0
- data/lib/git/diff.rb +295 -12
- data/lib/git/diff_file_numstat_info.rb +31 -0
- data/lib/git/diff_file_patch_info.rb +136 -0
- data/lib/git/diff_file_raw_info.rb +129 -0
- data/lib/git/diff_info.rb +162 -0
- data/lib/git/diff_path_status.rb +80 -19
- data/lib/git/diff_result.rb +34 -0
- data/lib/git/diff_stats.rb +66 -14
- data/lib/git/dirstat_info.rb +102 -0
- data/lib/git/encoding_utils.rb +57 -1
- data/lib/git/errors.rb +107 -26
- data/lib/git/escaped_path.rb +55 -3
- data/lib/git/execution_context/global.rb +31 -0
- data/lib/git/execution_context/repository.rb +151 -0
- data/lib/git/execution_context.rb +559 -0
- data/lib/git/factories.rb +1049 -0
- data/lib/git/file_ref.rb +77 -0
- data/lib/git/fsck_object.rb +17 -9
- data/lib/git/fsck_result.rb +27 -16
- data/lib/git/log.rb +172 -65
- data/lib/git/object.rb +323 -108
- data/lib/git/parsers/branch.rb +240 -0
- data/lib/git/parsers/cat_file.rb +111 -0
- data/lib/git/parsers/config_entry.rb +110 -0
- data/lib/git/parsers/diff.rb +792 -0
- data/lib/git/parsers/fsck.rb +144 -0
- data/lib/git/parsers/grep.rb +42 -0
- data/lib/git/parsers/ls_remote.rb +79 -0
- data/lib/git/parsers/ls_tree.rb +58 -0
- data/lib/git/parsers/remote.rb +162 -0
- data/lib/git/parsers/stash.rb +292 -0
- data/lib/git/parsers/status.rb +251 -0
- data/lib/git/parsers/tag.rb +341 -0
- data/lib/git/parsers/worktree.rb +185 -0
- data/lib/git/path_resolver.rb +274 -0
- data/lib/git/remote_info.rb +203 -0
- data/lib/git/repository/branching.rb +796 -0
- data/lib/git/repository/committing.rb +221 -0
- data/lib/git/repository/context_helpers.rb +454 -0
- data/lib/git/repository/diffing.rb +743 -0
- data/lib/git/repository/inspecting.rb +252 -0
- data/lib/git/repository/logging.rb +410 -0
- data/lib/git/repository/maintenance.rb +65 -0
- data/lib/git/repository/merging.rb +429 -0
- data/lib/git/repository/object_operations.rb +1334 -0
- data/lib/git/repository/remote_operations.rb +772 -0
- data/lib/git/repository/shared_private.rb +120 -0
- data/lib/git/repository/staging.rb +409 -0
- data/lib/git/repository/stashing.rb +619 -0
- data/lib/git/repository/status_operations.rb +196 -0
- data/lib/git/repository/worktree_operations.rb +252 -0
- data/lib/git/repository.rb +204 -1
- data/lib/git/stash_info.rb +102 -0
- data/lib/git/status_file_info.rb +258 -0
- data/lib/git/status_info.rb +189 -0
- data/lib/git/system_call_guard.rb +95 -0
- data/lib/git/tag_delete_failure.rb +34 -0
- data/lib/git/tag_delete_result.rb +66 -0
- data/lib/git/tag_info.rb +99 -0
- data/lib/git/url.rb +12 -5
- data/lib/git/version.rb +111 -2
- data/lib/git/version_constraint.rb +85 -0
- data/lib/git/worktree_info.rb +128 -0
- data/lib/git.rb +319 -332
- metadata +318 -74
- data/.commitlintrc.yml +0 -38
- data/.github/copilot-instructions.md +0 -2733
- data/.github/issue_template.md +0 -15
- data/.github/pull_request_template.md +0 -17
- data/.github/workflows/continuous_integration.yml +0 -120
- data/.github/workflows/enforce_conventional_commits.yml +0 -29
- data/.github/workflows/experimental_continuous_integration.yml +0 -59
- data/.github/workflows/release.yml +0 -53
- data/.gitignore +0 -15
- data/.husky/commit-msg +0 -1
- data/.release-please-manifest.json +0 -3
- data/.rubocop.yml +0 -55
- data/.rubocop_todo.yml +0 -12
- data/Gemfile +0 -5
- data/Rakefile +0 -18
- data/lib/git/args_builder.rb +0 -111
- data/lib/git/author.rb +0 -16
- data/lib/git/base.rb +0 -1140
- data/lib/git/branch.rb +0 -423
- data/lib/git/branches.rb +0 -68
- data/lib/git/command_line_result.rb +0 -92
- data/lib/git/index.rb +0 -6
- data/lib/git/lib.rb +0 -2333
- data/lib/git/path.rb +0 -38
- data/lib/git/remote.rb +0 -39
- data/lib/git/stash.rb +0 -26
- data/lib/git/stashes.rb +0 -56
- data/lib/git/status.rb +0 -159
- data/lib/git/working_directory.rb +0 -6
- data/lib/git/worktree.rb +0 -39
- data/lib/git/worktrees.rb +0 -47
- data/package.json +0 -10
- data/redesign/1_architecture_existing.md +0 -66
- data/redesign/2_architecture_redesign.md +0 -130
- data/redesign/3_architecture_implementation.md +0 -138
- data/redesign/index.md +0 -34
- data/release-please-config.json +0 -36
- data/tasks/gem_tasks.rake +0 -10
- data/tasks/rubocop.rake +0 -12
- data/tasks/test.rake +0 -13
- data/tasks/test_gem.rake +0 -12
- data/tasks/yard.rake +0 -23
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
# Implementation Plan for Git Gem Redesign (v5.0.0)
|
|
2
|
-
|
|
3
|
-
This document outlines a step-by-step plan to implement the proposed architectural redesign. The plan is structured to be incremental, ensuring that the gem remains functional and passes its test suite after each major step. This approach minimizes risk and allows for a gradual, controlled migration to the new architecture.
|
|
4
|
-
|
|
5
|
-
- [Phase 1: Foundation and Scaffolding](#phase-1-foundation-and-scaffolding)
|
|
6
|
-
- [Phase 2: The Strangler Fig Pattern - Migrating Commands](#phase-2-the-strangler-fig-pattern---migrating-commands)
|
|
7
|
-
- [Phase 3: Refactoring the Public Interface](#phase-3-refactoring-the-public-interface)
|
|
8
|
-
- [Phase 4: Final Cleanup and Release Preparation](#phase-4-final-cleanup-and-release-preparation)
|
|
9
|
-
|
|
10
|
-
## Phase 1: Foundation and Scaffolding
|
|
11
|
-
|
|
12
|
-
***Goal**: Set up the new file structure and class names without altering existing logic. The gem will be fully functional after this phase.*
|
|
13
|
-
|
|
14
|
-
1. **Create New Directory Structure**:
|
|
15
|
-
|
|
16
|
-
- Create the new directories that will house the refactored components:
|
|
17
|
-
|
|
18
|
-
- `lib/git/commands/`
|
|
19
|
-
|
|
20
|
-
- `lib/git/repository/` (for the facade modules)
|
|
21
|
-
|
|
22
|
-
2. **Rename Path Classes**:
|
|
23
|
-
|
|
24
|
-
- Perform a project-wide, safe rename of the existing path-related classes. This is a low-risk mechanical change.
|
|
25
|
-
|
|
26
|
-
- `Git::WorkingDirectory` -> `Git::WorkingTreePath`
|
|
27
|
-
|
|
28
|
-
- `Git::Index` -> `Git::IndexPath`
|
|
29
|
-
|
|
30
|
-
- `Git::Repository` -> `Git::RepositoryPath`
|
|
31
|
-
|
|
32
|
-
- Run the test suite to ensure everything still works as expected.
|
|
33
|
-
|
|
34
|
-
3. **Introduce New Core Classes (Empty Shells)**:
|
|
35
|
-
|
|
36
|
-
- Create the new `Git::ExecutionContext` class in `lib/git/execution_context.rb`. For now, its implementation can be a simple shell or a thin wrapper around the existing `Git::Lib`.
|
|
37
|
-
|
|
38
|
-
- Create the new `Git::Repository` class in `lib/git/repository.rb`. This will initially be an empty class.
|
|
39
|
-
|
|
40
|
-
4. **Set Up RSpec Environment**:
|
|
41
|
-
|
|
42
|
-
- Add rspec dependencies to the `Gemfile` as a development dependency.
|
|
43
|
-
|
|
44
|
-
- Configure the test setup to allow both TestUnit and RSpec tests to run concurrently.
|
|
45
|
-
|
|
46
|
-
## Phase 2: The Strangler Fig Pattern - Migrating Commands
|
|
47
|
-
|
|
48
|
-
***Goal**: Incrementally move the implementation of each git command from `Git::Lib` to a new `Command` class, strangling the old implementation one piece at a time using a Test-Driven Development workflow.*
|
|
49
|
-
|
|
50
|
-
- **1. Migrate the First Command (`config`)**:
|
|
51
|
-
|
|
52
|
-
- **Write Unit Tests First**: Write comprehensive RSpec unit tests for the *proposed* `Git::Commands::Config` class. These tests will fail initially because the class doesn't exist yet. The tests should be fast and mock the `ExecutionContext`.
|
|
53
|
-
|
|
54
|
-
- **Create Command Class**: Implement `Git::Commands::Config` to make the tests pass. This class will contain all the logic for building git config arguments and parsing its output. It will accept an `ExecutionContext` instance in its constructor.
|
|
55
|
-
|
|
56
|
-
- **Delegate from `Git::Lib`**: Modify the `config_*` methods within the existing `Git::Lib` class. Instead of containing the implementation, they will now instantiate and call the new `Git::Commands::Config` object.
|
|
57
|
-
|
|
58
|
-
- **Verify**: Run the full test suite (both TestUnit and RSpec). The existing tests for `g.config` should still pass, but they will now be executing the new, refactored code.
|
|
59
|
-
|
|
60
|
-
- **2. Incrementally Migrate Remaining Commands:**
|
|
61
|
-
|
|
62
|
-
- Repeat the process from the previous step for all other commands, one by one or in logical groups (e.g., all `diff` related commands, then all `log` commands).
|
|
63
|
-
|
|
64
|
-
- For each command (`add`, `commit`, `log`, `diff`, `status`, etc.):
|
|
65
|
-
|
|
66
|
-
1. Create the corresponding Git::Commands::* class.
|
|
67
|
-
|
|
68
|
-
2. Write isolated RSpec unit tests for the new class.
|
|
69
|
-
|
|
70
|
-
3. Change the method in Git::Lib to delegate to the new command object.
|
|
71
|
-
|
|
72
|
-
4. Run the full test suite to ensure no regressions have been introduced.
|
|
73
|
-
|
|
74
|
-
## Phase 3: Refactoring the Public Interface
|
|
75
|
-
|
|
76
|
-
***Goal**: Switch the public-facing classes to use the new architecture directly, breaking the final ties to the old implementation.*
|
|
77
|
-
|
|
78
|
-
1. **Refactor Factory Methods**:
|
|
79
|
-
|
|
80
|
-
- Modify the factory methods in the top-level `Git` module (`.open`, `.clone`, etc.).
|
|
81
|
-
|
|
82
|
-
- These methods will now be responsible for creating an instance of `Git::ExecutionContext` and injecting it into the constructor of a `Git::Repository` object.
|
|
83
|
-
|
|
84
|
-
The return value of these factories will now be a `Git::Repository` instance, not a `Git::Base` instance.
|
|
85
|
-
|
|
86
|
-
2. **Implement the Facade**:
|
|
87
|
-
|
|
88
|
-
- Populate the `Git::Repository` class with the simple, one-line facade methods that delegate to the `Command` objects. For example:
|
|
89
|
-
|
|
90
|
-
```ruby
|
|
91
|
-
def commit(msg)
|
|
92
|
-
Git::Commands::Commit.new(@execution_context, msg).run
|
|
93
|
-
end
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
- Organize these facade methods into modules as planned (`lib/git/repository/branching.rb`, etc.) and include them in the main `Git::Repository` class.
|
|
97
|
-
|
|
98
|
-
3. **Deprecate and Alias `Git::Base`**:
|
|
99
|
-
|
|
100
|
-
- To maintain a degree of backward compatibility through the transition, make `Git::Base` a deprecated constant that points to `Git::Repository`.
|
|
101
|
-
|
|
102
|
-
```ruby
|
|
103
|
-
Git::Base = ActiveSupport::Deprecation::DeprecatedConstantProxy.new(
|
|
104
|
-
'Git::Base',
|
|
105
|
-
'Git::Repository',
|
|
106
|
-
Git::Deprecation
|
|
107
|
-
)
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
- This ensures that any user code checking `is_a?(Git::Base)` will not immediately break.
|
|
111
|
-
|
|
112
|
-
## Phase 4: Final Cleanup and Release Preparation
|
|
113
|
-
|
|
114
|
-
***Goal**: Remove all old code, finalize the test suite, and prepare for the v5.0.0 release.*
|
|
115
|
-
|
|
116
|
-
1. **Remove Old Code**:
|
|
117
|
-
|
|
118
|
-
- Delete the `Git::Lib` class entirely.
|
|
119
|
-
|
|
120
|
-
- Delete the `Git::Base` class file and remove the deprecation proxy.
|
|
121
|
-
|
|
122
|
-
- Remove any other dead code that was part of the old implementation.
|
|
123
|
-
|
|
124
|
-
2. **Finalize Test Suite**:
|
|
125
|
-
|
|
126
|
-
- Convert any remaining, relevant TestUnit tests to RSpec.
|
|
127
|
-
|
|
128
|
-
- Remove the `test-unit` dependency from the `Gemfile`.
|
|
129
|
-
|
|
130
|
-
- Ensure the RSpec suite has comprehensive coverage for the new architecture.
|
|
131
|
-
|
|
132
|
-
3. **Update Documentation**:
|
|
133
|
-
|
|
134
|
-
- Thoroughly document the new public API (`Git`, `Git::Repository`, etc.).
|
|
135
|
-
|
|
136
|
-
- Mark all internal classes (`ExecutionContext`, `Commands`, `*Path`) with `@api private` in the YARD documentation.
|
|
137
|
-
|
|
138
|
-
- Update the `README.md` and create a `UPGRADING.md` guide explaining the breaking changes for v5.0.0.
|
data/redesign/index.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Architectural Redesign Project
|
|
2
|
-
|
|
3
|
-
[This project was announced in the project's README](../README.md#2025-07-09-architectural-redesign)
|
|
4
|
-
|
|
5
|
-
The git gem is undergoing a significant architectural redesign for the upcoming
|
|
6
|
-
v5.0.0 release. The current architecture has several design challenges that make it
|
|
7
|
-
difficult to maintain and evolve. This redesign aims to address these issues by
|
|
8
|
-
introducing a clearer, more robust, and more testable structure.
|
|
9
|
-
|
|
10
|
-
We have prepared detailed documents outlining the analysis of the current
|
|
11
|
-
architecture and the proposed changes. We encourage our community and contributors to
|
|
12
|
-
review them:
|
|
13
|
-
|
|
14
|
-
1. [Analysis of the Current Architecture](1_architecture_existing.md): A
|
|
15
|
-
breakdown of the existing design and its challenges.
|
|
16
|
-
2. [The Proposed Redesign](2_architecture_redesign.md): An overview of the
|
|
17
|
-
new three-layered architecture.
|
|
18
|
-
3. [Implementation Plan](3_architecture_implementation.md): The step-by-step
|
|
19
|
-
plan for implementing the redesign.
|
|
20
|
-
|
|
21
|
-
Your feedback is welcome! Please feel free to open an issue to discuss the proposed
|
|
22
|
-
changes.
|
|
23
|
-
|
|
24
|
-
> **DON'T PANIC!**
|
|
25
|
-
>
|
|
26
|
-
> While this is a major internal refactoring, our goal is to keep the primary public
|
|
27
|
-
API on the main repository object as stable as possible. Most users who rely on
|
|
28
|
-
documented methods like `g.commit`, `g.add`, and `g.status` should find the
|
|
29
|
-
transition to v5.0.0 straightforward.
|
|
30
|
-
>
|
|
31
|
-
> The breaking changes will primarily affect users who have been relying on the
|
|
32
|
-
internal g.lib accessor, which will be removed as part of this cleanup. For more
|
|
33
|
-
details, please see the "Impact on Users" section in [the redesign
|
|
34
|
-
> document](2_architecture_redesign.md).
|
data/release-please-config.json
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"bootstrap-sha": "31374263eafea4e23352494ef4f6bea3ce62c1b5",
|
|
3
|
-
"packages": {
|
|
4
|
-
".": {
|
|
5
|
-
"release-type": "ruby",
|
|
6
|
-
"package-name": "git",
|
|
7
|
-
"changelog-path": "CHANGELOG.md",
|
|
8
|
-
"version-file": "lib/git/version.rb",
|
|
9
|
-
"bump-minor-pre-major": true,
|
|
10
|
-
"bump-patch-for-minor-pre-major": true,
|
|
11
|
-
"draft": false,
|
|
12
|
-
"prerelease": false,
|
|
13
|
-
"include-component-in-tag": false,
|
|
14
|
-
"pull-request-title-pattern": "chore: release v${version}",
|
|
15
|
-
"changelog-sections": [
|
|
16
|
-
{ "type": "feat", "section": "Features", "hidden": false },
|
|
17
|
-
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
|
|
18
|
-
{ "type": "build", "section": "Other Changes", "hidden": false },
|
|
19
|
-
{ "type": "chore", "section": "Other Changes", "hidden": false },
|
|
20
|
-
{ "type": "ci", "section": "Other Changes", "hidden": false },
|
|
21
|
-
{ "type": "docs", "section": "Other Changes", "hidden": false },
|
|
22
|
-
{ "type": "perf", "section": "Other Changes", "hidden": false },
|
|
23
|
-
{ "type": "refactor", "section": "Other Changes", "hidden": false },
|
|
24
|
-
{ "type": "revert", "section": "Other Changes", "hidden": false },
|
|
25
|
-
{ "type": "style", "section": "Other Changes", "hidden": false },
|
|
26
|
-
{ "type": "test", "section": "Other Changes", "hidden": false }
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"plugins": [
|
|
31
|
-
{
|
|
32
|
-
"type": "sentence-case"
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
|
36
|
-
}
|
data/tasks/gem_tasks.rake
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# RuboCop analyzes source text, so its verdict is fixed by TargetRubyVersion in
|
|
4
|
-
# .rubocop.yml, not by the host Ruby. Skipping it on JRuby and TruffleRuby loses no
|
|
5
|
-
# coverage (the MRI matrix jobs lint the same files) and avoids RuboCop internal
|
|
6
|
-
# cop errors on TruffleRuby.
|
|
7
|
-
#
|
|
8
|
-
unless RUBY_PLATFORM == 'java' || RUBY_ENGINE == 'truffleruby'
|
|
9
|
-
require 'rubocop/rake_task'
|
|
10
|
-
|
|
11
|
-
RuboCop::RakeTask.new
|
|
12
|
-
end
|
data/tasks/test.rake
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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
|