git 5.0.0.beta.2 → 5.0.0.beta.4
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/.dockerignore +27 -0
- data/.github/copilot-instructions.md +3 -8
- data/.github/hooks/bin-setup-on-worktree.json +11 -0
- data/.github/hooks/run-bin-setup-once.sh +14 -0
- data/.github/skills/breaking-change-analysis/SKILL.md +6 -9
- data/.github/skills/ci-cd-troubleshooting/SKILL.md +2 -2
- data/.github/skills/command-implementation/REFERENCE.md +34 -33
- data/.github/skills/command-implementation/SKILL.md +5 -4
- data/.github/skills/command-test-conventions/SKILL.md +13 -9
- data/.github/skills/command-yard-documentation/SKILL.md +14 -6
- data/.github/skills/development-workflow/SKILL.md +20 -14
- data/.github/skills/facade-implementation/REFERENCE.md +19 -22
- data/.github/skills/facade-implementation/SKILL.md +0 -5
- data/.github/skills/facade-test-conventions/SKILL.md +4 -7
- data/.github/skills/facade-yard-documentation/SKILL.md +8 -2
- data/.github/skills/make-skill-template/SKILL.md +53 -3
- data/.github/skills/pr-readiness-review/SKILL.md +22 -2
- data/.github/skills/project-context/SKILL.md +16 -23
- data/.github/skills/pull-request-review/SKILL.md +2 -2
- data/.github/skills/rebase/SKILL.md +148 -0
- data/.github/skills/refactor-command-to-commandlineresult/SKILL.md +1 -1
- data/.github/skills/resolve-feedback/SKILL.md +288 -0
- data/.github/skills/review-arguments-dsl/CHECKLIST.md +3 -3
- data/.github/skills/reviewing-skills/SKILL.md +28 -3
- data/.github/skills/test-debugging/SKILL.md +20 -19
- data/.github/skills/yard-documentation/SKILL.md +671 -483
- data/.github/skills/yard-documentation/element-rules.md +162 -0
- data/.github/skills-deprecated/README.md +21 -0
- data/.github/{skills → skills-deprecated}/extract-command-from-lib/SKILL.md +9 -9
- data/.github/{skills → skills-deprecated}/extract-facade-from-base-lib/SKILL.md +12 -12
- data/.github/workflows/continuous_integration.yml +3 -2
- data/.rubocop.yml +7 -39
- data/.yard-lint.yml +75 -0
- data/CONTRIBUTING.md +186 -174
- data/Gemfile +17 -0
- data/README.md +86 -23
- data/Rakefile +3 -21
- data/UPGRADING.md +219 -70
- data/docker/test/Dockerfile +32 -0
- data/docker/test/docker-compose.yml +0 -0
- data/git.gemspec +3 -4
- data/lib/git/author.rb +20 -1
- data/lib/git/branch.rb +26 -6
- data/lib/git/branch_delete_failure.rb +3 -0
- data/lib/git/branch_delete_result.rb +6 -3
- data/lib/git/branch_info.rb +6 -6
- data/lib/git/command_line/base.rb +6 -13
- data/lib/git/command_line/capturing.rb +67 -10
- data/lib/git/command_line/result.rb +0 -8
- data/lib/git/command_line/streaming.rb +45 -5
- data/lib/git/command_line.rb +4 -3
- data/lib/git/commands/add.rb +61 -53
- data/lib/git/commands/am/abort.rb +2 -2
- data/lib/git/commands/am/apply.rb +109 -98
- data/lib/git/commands/am/continue.rb +2 -2
- data/lib/git/commands/am/quit.rb +2 -2
- data/lib/git/commands/am/retry.rb +4 -2
- data/lib/git/commands/am/show_current_patch.rb +1 -1
- data/lib/git/commands/am/skip.rb +2 -2
- data/lib/git/commands/am.rb +2 -2
- data/lib/git/commands/apply.rb +7 -2
- data/lib/git/commands/archive/list_formats.rb +3 -3
- data/lib/git/commands/archive.rb +7 -2
- data/lib/git/commands/arguments.rb +1370 -359
- data/lib/git/commands/base.rb +111 -13
- data/lib/git/commands/branch/copy.rb +29 -21
- data/lib/git/commands/branch/create.rb +72 -68
- data/lib/git/commands/branch/delete.rb +25 -17
- data/lib/git/commands/branch/list.rb +76 -60
- data/lib/git/commands/branch/move.rb +29 -21
- data/lib/git/commands/branch/set_upstream.rb +8 -8
- data/lib/git/commands/branch/show_current.rb +3 -3
- data/lib/git/commands/branch/unset_upstream.rb +4 -8
- data/lib/git/commands/branch.rb +2 -2
- data/lib/git/commands/cat_file/batch.rb +36 -20
- data/lib/git/commands/cat_file/filtered.rb +12 -12
- data/lib/git/commands/cat_file/raw.rb +13 -13
- data/lib/git/commands/cat_file.rb +4 -4
- data/lib/git/commands/checkout/branch.rb +7 -5
- data/lib/git/commands/checkout/files.rb +5 -4
- data/lib/git/commands/checkout.rb +4 -4
- data/lib/git/commands/checkout_index.rb +5 -4
- data/lib/git/commands/clean.rb +6 -4
- data/lib/git/commands/clone.rb +5 -4
- data/lib/git/commands/commit.rb +5 -4
- data/lib/git/commands/commit_tree.rb +5 -4
- data/lib/git/commands/config_option_syntax/add.rb +7 -4
- data/lib/git/commands/config_option_syntax/get.rb +9 -5
- data/lib/git/commands/config_option_syntax/get_all.rb +7 -4
- data/lib/git/commands/config_option_syntax/get_color.rb +8 -4
- data/lib/git/commands/config_option_syntax/get_color_bool.rb +7 -4
- data/lib/git/commands/config_option_syntax/get_regexp.rb +8 -4
- data/lib/git/commands/config_option_syntax/get_urlmatch.rb +8 -4
- data/lib/git/commands/config_option_syntax/list.rb +8 -4
- data/lib/git/commands/config_option_syntax/remove_section.rb +7 -2
- data/lib/git/commands/config_option_syntax/rename_section.rb +7 -2
- data/lib/git/commands/config_option_syntax/replace_all.rb +7 -2
- data/lib/git/commands/config_option_syntax/set.rb +7 -2
- data/lib/git/commands/config_option_syntax/unset.rb +7 -4
- data/lib/git/commands/config_option_syntax/unset_all.rb +7 -2
- data/lib/git/commands/describe.rb +5 -4
- data/lib/git/commands/diff.rb +13 -12
- data/lib/git/commands/diff_files.rb +7 -6
- data/lib/git/commands/diff_index.rb +10 -7
- data/lib/git/commands/fetch.rb +6 -4
- data/lib/git/commands/fsck.rb +6 -4
- data/lib/git/commands/gc.rb +6 -4
- data/lib/git/commands/grep.rb +6 -5
- data/lib/git/commands/init.rb +6 -4
- data/lib/git/commands/log.rb +287 -285
- data/lib/git/commands/ls_files.rb +69 -65
- data/lib/git/commands/ls_remote.rb +62 -56
- data/lib/git/commands/ls_tree.rb +50 -46
- data/lib/git/commands/maintenance/register.rb +25 -23
- data/lib/git/commands/maintenance/run.rb +7 -2
- data/lib/git/commands/maintenance/start.rb +7 -2
- data/lib/git/commands/maintenance/stop.rb +7 -2
- data/lib/git/commands/maintenance/unregister.rb +7 -2
- data/lib/git/commands/merge/abort.rb +2 -2
- data/lib/git/commands/merge/continue.rb +2 -2
- data/lib/git/commands/merge/quit.rb +2 -2
- data/lib/git/commands/merge/start.rb +7 -2
- data/lib/git/commands/merge.rb +2 -2
- data/lib/git/commands/merge_base.rb +7 -2
- data/lib/git/commands/mv.rb +7 -2
- data/lib/git/commands/name_rev.rb +7 -2
- data/lib/git/commands/pull.rb +7 -2
- data/lib/git/commands/push.rb +7 -2
- data/lib/git/commands/read_tree.rb +7 -2
- data/lib/git/commands/remote/add.rb +7 -2
- data/lib/git/commands/remote/get_url.rb +4 -2
- data/lib/git/commands/remote/list.rb +4 -2
- data/lib/git/commands/remote/prune.rb +4 -2
- data/lib/git/commands/remote/remove.rb +4 -2
- data/lib/git/commands/remote/rename.rb +4 -2
- data/lib/git/commands/remote/set_branches.rb +9 -2
- data/lib/git/commands/remote/set_head.rb +12 -5
- data/lib/git/commands/remote/set_url.rb +9 -2
- data/lib/git/commands/remote/set_url_add.rb +11 -2
- data/lib/git/commands/remote/set_url_delete.rb +9 -2
- data/lib/git/commands/remote/show.rb +18 -12
- data/lib/git/commands/remote/update.rb +19 -12
- data/lib/git/commands/remote.rb +2 -2
- data/lib/git/commands/repack.rb +67 -63
- data/lib/git/commands/reset.rb +51 -44
- data/lib/git/commands/rev_parse.rb +135 -128
- data/lib/git/commands/revert/abort.rb +2 -2
- data/lib/git/commands/revert/continue.rb +7 -2
- data/lib/git/commands/revert/quit.rb +2 -2
- data/lib/git/commands/revert/skip.rb +2 -2
- data/lib/git/commands/revert/start.rb +7 -2
- data/lib/git/commands/revert.rb +2 -2
- data/lib/git/commands/rm.rb +35 -36
- data/lib/git/commands/show.rb +1 -1
- data/lib/git/commands/show_ref/exclude_existing.rb +3 -4
- data/lib/git/commands/show_ref/exists.rb +15 -13
- data/lib/git/commands/show_ref/list.rb +39 -35
- data/lib/git/commands/show_ref/verify.rb +29 -27
- data/lib/git/commands/show_ref.rb +4 -4
- data/lib/git/commands/stash/apply.rb +31 -25
- data/lib/git/commands/stash/branch.rb +10 -8
- data/lib/git/commands/stash/clear.rb +7 -5
- data/lib/git/commands/stash/create.rb +10 -8
- data/lib/git/commands/stash/drop.rb +15 -9
- data/lib/git/commands/stash/list.rb +9 -5
- data/lib/git/commands/stash/pop.rb +21 -12
- data/lib/git/commands/stash/push.rb +20 -11
- data/lib/git/commands/stash/show.rb +21 -12
- data/lib/git/commands/stash/store.rb +19 -10
- data/lib/git/commands/stash.rb +2 -2
- data/lib/git/commands/status.rb +7 -2
- data/lib/git/commands/symbolic_ref/delete.rb +18 -14
- data/lib/git/commands/symbolic_ref/read.rb +24 -20
- data/lib/git/commands/symbolic_ref/update.rb +20 -17
- data/lib/git/commands/symbolic_ref.rb +4 -4
- data/lib/git/commands/tag/create.rb +45 -42
- data/lib/git/commands/tag/delete.rb +5 -3
- data/lib/git/commands/tag/list.rb +47 -44
- data/lib/git/commands/tag/verify.rb +12 -12
- data/lib/git/commands/tag.rb +2 -2
- data/lib/git/commands/update_ref/batch.rb +6 -1
- data/lib/git/commands/update_ref/delete.rb +19 -21
- data/lib/git/commands/update_ref/update.rb +22 -25
- data/lib/git/commands/update_ref.rb +4 -4
- data/lib/git/commands/version.rb +14 -11
- data/lib/git/commands/worktree/add.rb +50 -51
- data/lib/git/commands/worktree/list.rb +17 -17
- data/lib/git/commands/worktree/lock.rb +12 -12
- data/lib/git/commands/worktree/move.rb +16 -16
- data/lib/git/commands/worktree/prune.rb +2 -2
- data/lib/git/commands/worktree/remove.rb +2 -2
- data/lib/git/commands/worktree/repair.rb +2 -2
- data/lib/git/commands/worktree/unlock.rb +2 -2
- data/lib/git/commands/write_tree.rb +2 -2
- data/lib/git/commands.rb +4 -3
- data/lib/git/config.rb +47 -1
- data/lib/git/configuring.rb +89 -15
- data/lib/git/detached_head_info.rb +4 -1
- data/lib/git/diff.rb +2 -5
- data/lib/git/diff_file_numstat_info.rb +3 -1
- data/lib/git/diff_file_patch_info.rb +3 -1
- data/lib/git/diff_file_raw_info.rb +3 -1
- data/lib/git/diff_info.rb +8 -15
- data/lib/git/diff_path_status.rb +16 -3
- data/lib/git/diff_result.rb +3 -1
- data/lib/git/diff_stats.rb +15 -0
- data/lib/git/dirstat_info.rb +24 -8
- data/lib/git/encoding_utils.rb +32 -1
- data/lib/git/errors.rb +19 -9
- data/lib/git/escaped_path.rb +55 -3
- data/lib/git/execution_context/repository.rb +15 -0
- data/lib/git/execution_context.rb +76 -74
- data/lib/git/file_ref.rb +6 -3
- data/lib/git/fsck_object.rb +8 -0
- data/lib/git/fsck_result.rb +26 -15
- data/lib/git/log.rb +152 -5
- data/lib/git/object.rb +284 -8
- data/lib/git/parsers/branch.rb +18 -0
- data/lib/git/parsers/cat_file.rb +2 -2
- data/lib/git/parsers/diff.rb +213 -5
- data/lib/git/parsers/fsck.rb +11 -0
- data/lib/git/parsers/ls_remote.rb +1 -1
- data/lib/git/parsers/stash.rb +51 -0
- data/lib/git/parsers/tag.rb +38 -0
- data/lib/git/remote.rb +34 -2
- data/lib/git/repository/branching.rb +23 -21
- data/lib/git/repository/committing.rb +46 -6
- data/lib/git/repository/context_helpers.rb +45 -16
- data/lib/git/repository/diffing.rb +32 -23
- data/lib/git/repository/factories.rb +153 -28
- data/lib/git/repository/inspecting.rb +1 -1
- data/lib/git/repository/logging.rb +169 -30
- data/lib/git/repository/maintenance.rb +1 -1
- data/lib/git/repository/merging.rb +3 -3
- data/lib/git/repository/object_operations.rb +108 -14
- data/lib/git/repository/remote_operations.rb +150 -171
- data/lib/git/repository/shared_private.rb +7 -5
- data/lib/git/repository/staging.rb +36 -12
- data/lib/git/repository/stashing.rb +16 -16
- data/lib/git/repository/status_operations.rb +1 -1
- data/lib/git/repository/worktree_operations.rb +1 -1
- data/lib/git/repository.rb +287 -6
- data/lib/git/stash.rb +16 -21
- data/lib/git/stash_info.rb +4 -4
- data/lib/git/stashes.rb +20 -26
- data/lib/git/status.rb +25 -13
- data/lib/git/tag_delete_failure.rb +3 -0
- data/lib/git/tag_delete_result.rb +6 -3
- data/lib/git/tag_info.rb +1 -0
- data/lib/git/url.rb +12 -5
- data/lib/git/version.rb +6 -4
- data/lib/git/version_constraint.rb +4 -0
- data/lib/git.rb +400 -314
- data/redesign/3_architecture_implementation.md +81 -30
- data/redesign/Phase 4 - Step A.md +6 -0
- data/redesign/Phase 4 - Step B.md +921 -0
- data/redesign/Phase 4 - Step C.md +833 -0
- data/redesign/c1a-public-api-scope.tsv +256 -0
- data/redesign/phase-4-step-b-test-audit.tsv +485 -0
- data/tasks/yard.rake +24 -17
- metadata +24 -58
- data/commitlint.test +0 -4
- data/lib/git/args_builder.rb +0 -103
- data/lib/git/command_line_result.rb +0 -8
- data/lib/git/deprecation.rb +0 -9
- data/lib/git/repository/configuring.rb +0 -351
- data/tasks/test.rake +0 -25
- /data/.github/{skills → skills-deprecated}/extract-facade-from-base-lib/KEYWORD_ARG_REMEDIATION.md +0 -0
- /data/.github/{skills → skills-deprecated}/review-backward-compatibility/SKILL.md +0 -0
data/tasks/yard.rake
CHANGED
|
@@ -16,20 +16,22 @@ unless RUBY_PLATFORM == 'java' || RUBY_ENGINE == 'truffleruby'
|
|
|
16
16
|
CLEAN << '.yardoc'
|
|
17
17
|
CLEAN << 'doc'
|
|
18
18
|
|
|
19
|
-
# yard:
|
|
19
|
+
# yard:lint
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
# yard
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
# Lints YARD documentation against the project's standards and enforces the
|
|
22
|
+
# minimum documentation coverage threshold. Configuration lives in
|
|
23
|
+
# .yard-lint.yml.
|
|
24
|
+
#
|
|
25
|
+
# yard-lint requires Ruby >= 3.3, so the lint task is only defined and only
|
|
26
|
+
# included in the aggregate `yard` task on Ruby 3.3+.
|
|
27
|
+
#
|
|
28
|
+
yard_lint_supported = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.3.0')
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
if yard_lint_supported
|
|
31
|
+
desc 'Lint YARD documentation with yard-lint'
|
|
32
|
+
task :'yard:lint' do
|
|
33
|
+
sh 'bundle exec yard-lint lib/'
|
|
34
|
+
end
|
|
33
35
|
end
|
|
34
36
|
|
|
35
37
|
# yard:example-test
|
|
@@ -42,9 +44,14 @@ unless RUBY_PLATFORM == 'java' || RUBY_ENGINE == 'truffleruby'
|
|
|
42
44
|
|
|
43
45
|
# yard
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
yard_tasks = %i[yard:build]
|
|
48
|
+
yard_tasks << :'yard:lint' if yard_lint_supported
|
|
49
|
+
yard_tasks << :'yard:example-test'
|
|
50
|
+
|
|
51
|
+
yard_steps = ['build']
|
|
52
|
+
yard_steps << 'lint' if yard_lint_supported
|
|
53
|
+
yard_steps << 'example-test'
|
|
54
|
+
|
|
55
|
+
desc "Run YARD documentation tasks (#{yard_steps.join(', ')})"
|
|
56
|
+
task yard: yard_tasks
|
|
50
57
|
end
|
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
|
+
version: 5.0.0.beta.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Scott Chacon and others
|
|
@@ -107,34 +107,6 @@ dependencies:
|
|
|
107
107
|
- - "~>"
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
109
|
version: '0.1'
|
|
110
|
-
- !ruby/object:Gem::Dependency
|
|
111
|
-
name: minitar
|
|
112
|
-
requirement: !ruby/object:Gem::Requirement
|
|
113
|
-
requirements:
|
|
114
|
-
- - "~>"
|
|
115
|
-
- !ruby/object:Gem::Version
|
|
116
|
-
version: '1.1'
|
|
117
|
-
type: :development
|
|
118
|
-
prerelease: false
|
|
119
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
120
|
-
requirements:
|
|
121
|
-
- - "~>"
|
|
122
|
-
- !ruby/object:Gem::Version
|
|
123
|
-
version: '1.1'
|
|
124
|
-
- !ruby/object:Gem::Dependency
|
|
125
|
-
name: mocha
|
|
126
|
-
requirement: !ruby/object:Gem::Requirement
|
|
127
|
-
requirements:
|
|
128
|
-
- - "~>"
|
|
129
|
-
- !ruby/object:Gem::Version
|
|
130
|
-
version: '2.8'
|
|
131
|
-
type: :development
|
|
132
|
-
prerelease: false
|
|
133
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
134
|
-
requirements:
|
|
135
|
-
- - "~>"
|
|
136
|
-
- !ruby/object:Gem::Version
|
|
137
|
-
version: '2.8'
|
|
138
110
|
- !ruby/object:Gem::Dependency
|
|
139
111
|
name: parallel_tests
|
|
140
112
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -233,20 +205,6 @@ dependencies:
|
|
|
233
205
|
- - "~>"
|
|
234
206
|
- !ruby/object:Gem::Version
|
|
235
207
|
version: '0.4'
|
|
236
|
-
- !ruby/object:Gem::Dependency
|
|
237
|
-
name: test-unit
|
|
238
|
-
requirement: !ruby/object:Gem::Requirement
|
|
239
|
-
requirements:
|
|
240
|
-
- - "~>"
|
|
241
|
-
- !ruby/object:Gem::Version
|
|
242
|
-
version: '3.7'
|
|
243
|
-
type: :development
|
|
244
|
-
prerelease: false
|
|
245
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
246
|
-
requirements:
|
|
247
|
-
- - "~>"
|
|
248
|
-
- !ruby/object:Gem::Version
|
|
249
|
-
version: '3.7'
|
|
250
208
|
- !ruby/object:Gem::Dependency
|
|
251
209
|
name: irb
|
|
252
210
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -316,19 +274,19 @@ dependencies:
|
|
|
316
274
|
- !ruby/object:Gem::Version
|
|
317
275
|
version: 0.2.1
|
|
318
276
|
- !ruby/object:Gem::Dependency
|
|
319
|
-
name:
|
|
277
|
+
name: yard-lint
|
|
320
278
|
requirement: !ruby/object:Gem::Requirement
|
|
321
279
|
requirements:
|
|
322
280
|
- - "~>"
|
|
323
281
|
- !ruby/object:Gem::Version
|
|
324
|
-
version: '
|
|
282
|
+
version: '1.8'
|
|
325
283
|
type: :development
|
|
326
284
|
prerelease: false
|
|
327
285
|
version_requirements: !ruby/object:Gem::Requirement
|
|
328
286
|
requirements:
|
|
329
287
|
- - "~>"
|
|
330
288
|
- !ruby/object:Gem::Version
|
|
331
|
-
version: '
|
|
289
|
+
version: '1.8'
|
|
332
290
|
description: |
|
|
333
291
|
The git gem provides an API that can be used to
|
|
334
292
|
create, read, and manipulate Git repositories by wrapping system calls to the git
|
|
@@ -341,10 +299,18 @@ extensions: []
|
|
|
341
299
|
extra_rdoc_files: []
|
|
342
300
|
files:
|
|
343
301
|
- ".commitlintrc.yml"
|
|
302
|
+
- ".dockerignore"
|
|
344
303
|
- ".github/copilot-instructions.md"
|
|
304
|
+
- ".github/hooks/bin-setup-on-worktree.json"
|
|
305
|
+
- ".github/hooks/run-bin-setup-once.sh"
|
|
345
306
|
- ".github/issue_template.md"
|
|
346
307
|
- ".github/prompts/iteratively-address-copilot-reviews.prompt.md"
|
|
347
308
|
- ".github/pull_request_template.md"
|
|
309
|
+
- ".github/skills-deprecated/README.md"
|
|
310
|
+
- ".github/skills-deprecated/extract-command-from-lib/SKILL.md"
|
|
311
|
+
- ".github/skills-deprecated/extract-facade-from-base-lib/KEYWORD_ARG_REMEDIATION.md"
|
|
312
|
+
- ".github/skills-deprecated/extract-facade-from-base-lib/SKILL.md"
|
|
313
|
+
- ".github/skills-deprecated/review-backward-compatibility/SKILL.md"
|
|
348
314
|
- ".github/skills/breaking-change-analysis/SKILL.md"
|
|
349
315
|
- ".github/skills/ci-cd-troubleshooting/SKILL.md"
|
|
350
316
|
- ".github/skills/command-implementation/REFERENCE.md"
|
|
@@ -353,9 +319,6 @@ files:
|
|
|
353
319
|
- ".github/skills/command-yard-documentation/SKILL.md"
|
|
354
320
|
- ".github/skills/dependency-management/SKILL.md"
|
|
355
321
|
- ".github/skills/development-workflow/SKILL.md"
|
|
356
|
-
- ".github/skills/extract-command-from-lib/SKILL.md"
|
|
357
|
-
- ".github/skills/extract-facade-from-base-lib/KEYWORD_ARG_REMEDIATION.md"
|
|
358
|
-
- ".github/skills/extract-facade-from-base-lib/SKILL.md"
|
|
359
322
|
- ".github/skills/facade-implementation/REFERENCE.md"
|
|
360
323
|
- ".github/skills/facade-implementation/SKILL.md"
|
|
361
324
|
- ".github/skills/facade-test-conventions/SKILL.md"
|
|
@@ -364,17 +327,19 @@ files:
|
|
|
364
327
|
- ".github/skills/pr-readiness-review/SKILL.md"
|
|
365
328
|
- ".github/skills/project-context/SKILL.md"
|
|
366
329
|
- ".github/skills/pull-request-review/SKILL.md"
|
|
330
|
+
- ".github/skills/rebase/SKILL.md"
|
|
367
331
|
- ".github/skills/refactor-command-to-commandlineresult/SKILL.md"
|
|
368
332
|
- ".github/skills/release-management/SKILL.md"
|
|
333
|
+
- ".github/skills/resolve-feedback/SKILL.md"
|
|
369
334
|
- ".github/skills/review-arguments-dsl/CHECKLIST.md"
|
|
370
335
|
- ".github/skills/review-arguments-dsl/SKILL.md"
|
|
371
|
-
- ".github/skills/review-backward-compatibility/SKILL.md"
|
|
372
336
|
- ".github/skills/review-cross-command-consistency/SKILL.md"
|
|
373
337
|
- ".github/skills/reviewing-skills/SKILL.md"
|
|
374
338
|
- ".github/skills/rspec-unit-testing-standards/SKILL.md"
|
|
375
339
|
- ".github/skills/tdd-refactor-step/SKILL.md"
|
|
376
340
|
- ".github/skills/test-debugging/SKILL.md"
|
|
377
341
|
- ".github/skills/yard-documentation/SKILL.md"
|
|
342
|
+
- ".github/skills/yard-documentation/element-rules.md"
|
|
378
343
|
- ".github/workflows/continuous_integration.yml"
|
|
379
344
|
- ".github/workflows/enforce_conventional_commits.yml"
|
|
380
345
|
- ".github/workflows/experimental_continuous_integration.yml"
|
|
@@ -387,6 +352,7 @@ files:
|
|
|
387
352
|
- ".rspec"
|
|
388
353
|
- ".rubocop.yml"
|
|
389
354
|
- ".rubocop_todo.yml"
|
|
355
|
+
- ".yard-lint.yml"
|
|
390
356
|
- ".yardopts"
|
|
391
357
|
- AI_POLICY.md
|
|
392
358
|
- CHANGELOG.md
|
|
@@ -399,10 +365,10 @@ files:
|
|
|
399
365
|
- README.md
|
|
400
366
|
- Rakefile
|
|
401
367
|
- UPGRADING.md
|
|
402
|
-
-
|
|
368
|
+
- docker/test/Dockerfile
|
|
369
|
+
- docker/test/docker-compose.yml
|
|
403
370
|
- git.gemspec
|
|
404
371
|
- lib/git.rb
|
|
405
|
-
- lib/git/args_builder.rb
|
|
406
372
|
- lib/git/author.rb
|
|
407
373
|
- lib/git/branch.rb
|
|
408
374
|
- lib/git/branch_delete_failure.rb
|
|
@@ -414,7 +380,6 @@ files:
|
|
|
414
380
|
- lib/git/command_line/capturing.rb
|
|
415
381
|
- lib/git/command_line/result.rb
|
|
416
382
|
- lib/git/command_line/streaming.rb
|
|
417
|
-
- lib/git/command_line_result.rb
|
|
418
383
|
- lib/git/commands.rb
|
|
419
384
|
- lib/git/commands/add.rb
|
|
420
385
|
- lib/git/commands/am.rb
|
|
@@ -566,7 +531,6 @@ files:
|
|
|
566
531
|
- lib/git/config.rb
|
|
567
532
|
- lib/git/config_entry_info.rb
|
|
568
533
|
- lib/git/configuring.rb
|
|
569
|
-
- lib/git/deprecation.rb
|
|
570
534
|
- lib/git/detached_head_info.rb
|
|
571
535
|
- lib/git/diff.rb
|
|
572
536
|
- lib/git/diff_file_numstat_info.rb
|
|
@@ -602,7 +566,6 @@ files:
|
|
|
602
566
|
- lib/git/repository.rb
|
|
603
567
|
- lib/git/repository/branching.rb
|
|
604
568
|
- lib/git/repository/committing.rb
|
|
605
|
-
- lib/git/repository/configuring.rb
|
|
606
569
|
- lib/git/repository/context_helpers.rb
|
|
607
570
|
- lib/git/repository/diffing.rb
|
|
608
571
|
- lib/git/repository/factories.rb
|
|
@@ -635,16 +598,19 @@ files:
|
|
|
635
598
|
- redesign/2_architecture_redesign.md
|
|
636
599
|
- redesign/3_architecture_implementation.md
|
|
637
600
|
- redesign/Phase 4 - Step A.md
|
|
601
|
+
- redesign/Phase 4 - Step B.md
|
|
602
|
+
- redesign/Phase 4 - Step C.md
|
|
638
603
|
- redesign/beta_release.md
|
|
604
|
+
- redesign/c1a-public-api-scope.tsv
|
|
639
605
|
- redesign/c1c2_audit.md
|
|
640
606
|
- redesign/c1c2_bucket6_lib_orphans.md
|
|
641
607
|
- redesign/config_design.rb
|
|
642
608
|
- redesign/index.md
|
|
609
|
+
- redesign/phase-4-step-b-test-audit.tsv
|
|
643
610
|
- tasks/gem_tasks.rake
|
|
644
611
|
- tasks/npm_tasks.rake
|
|
645
612
|
- tasks/rspec.rake
|
|
646
613
|
- tasks/rubocop.rake
|
|
647
|
-
- tasks/test.rake
|
|
648
614
|
- tasks/test_gem.rake
|
|
649
615
|
- tasks/yard.rake
|
|
650
616
|
homepage: http://github.com/ruby-git/ruby-git
|
|
@@ -653,8 +619,8 @@ licenses:
|
|
|
653
619
|
metadata:
|
|
654
620
|
homepage_uri: http://github.com/ruby-git/ruby-git
|
|
655
621
|
source_code_uri: http://github.com/ruby-git/ruby-git
|
|
656
|
-
changelog_uri: https://rubydoc.info/gems/git/5.0.0.beta.
|
|
657
|
-
documentation_uri: https://rubydoc.info/gems/git/5.0.0.beta.
|
|
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
|
|
658
624
|
rubygems_mfa_required: 'true'
|
|
659
625
|
rdoc_options: []
|
|
660
626
|
require_paths:
|
data/commitlint.test
DELETED
data/lib/git/args_builder.rb
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Git
|
|
4
|
-
# Takes a hash of user options and a declarative map and produces
|
|
5
|
-
# an array of command-line arguments. Also validates that only
|
|
6
|
-
# supported options are provided based on the map.
|
|
7
|
-
#
|
|
8
|
-
# @api private
|
|
9
|
-
class ArgsBuilder
|
|
10
|
-
# This hash maps an option type to a lambda that knows how to build the
|
|
11
|
-
# corresponding command-line argument. This is a scalable dispatch table.
|
|
12
|
-
ARG_BUILDERS = {
|
|
13
|
-
boolean: ->(config, value) { value ? config[:flag] : [] },
|
|
14
|
-
|
|
15
|
-
valued_equals: ->(config, value) { "#{config[:flag]}=#{value}" if value },
|
|
16
|
-
|
|
17
|
-
valued_space: ->(config, value) { [config[:flag], value.to_s] if value },
|
|
18
|
-
|
|
19
|
-
repeatable_valued_space: lambda do |config, value|
|
|
20
|
-
Array(value).flat_map { |v| [config[:flag], v.to_s] }
|
|
21
|
-
end,
|
|
22
|
-
|
|
23
|
-
custom: ->(config, value) { config[:builder].call(value) },
|
|
24
|
-
|
|
25
|
-
validate_only: ->(_config, _value) { [] } # Does not build any args
|
|
26
|
-
}.freeze
|
|
27
|
-
|
|
28
|
-
# Main entrypoint to validate options and build arguments
|
|
29
|
-
def self.build(opts, option_map)
|
|
30
|
-
validate!(opts, option_map)
|
|
31
|
-
new(opts, option_map).build
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
# Public validation method that can be called independently
|
|
35
|
-
def self.validate!(opts, option_map)
|
|
36
|
-
validate_unsupported_keys!(opts, option_map)
|
|
37
|
-
validate_configured_options!(opts, option_map)
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
def initialize(opts, option_map)
|
|
41
|
-
@opts = opts
|
|
42
|
-
@option_map = option_map
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def build
|
|
46
|
-
@option_map.flat_map do |config|
|
|
47
|
-
type = config[:type]
|
|
48
|
-
next config[:flag] if type == :static
|
|
49
|
-
|
|
50
|
-
key = config[:keys].find { |k| @opts.key?(k) }
|
|
51
|
-
next [] unless key
|
|
52
|
-
|
|
53
|
-
build_arg_for_option(config, @opts[key])
|
|
54
|
-
end.compact
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
private
|
|
58
|
-
|
|
59
|
-
def build_arg_for_option(config, value)
|
|
60
|
-
builder = ARG_BUILDERS[config[:type]]
|
|
61
|
-
builder&.call(config, value) || []
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
private_class_method def self.validate_unsupported_keys!(opts, option_map)
|
|
65
|
-
all_valid_keys = option_map.flat_map { |config| config[:keys] }.compact
|
|
66
|
-
unsupported_keys = opts.keys - all_valid_keys
|
|
67
|
-
|
|
68
|
-
return if unsupported_keys.empty?
|
|
69
|
-
|
|
70
|
-
raise ArgumentError, "Unsupported options: #{unsupported_keys.map(&:inspect).join(', ')}"
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
private_class_method def self.validate_configured_options!(opts, option_map)
|
|
74
|
-
option_map.each do |config|
|
|
75
|
-
next unless config[:keys] # Skip static flags
|
|
76
|
-
|
|
77
|
-
check_for_missing_required_option!(opts, config)
|
|
78
|
-
validate_option_value!(opts, config)
|
|
79
|
-
end
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
private_class_method def self.check_for_missing_required_option!(opts, config)
|
|
83
|
-
return unless config[:required]
|
|
84
|
-
|
|
85
|
-
key_provided = config[:keys].any? { |k| opts.key?(k) }
|
|
86
|
-
return if key_provided
|
|
87
|
-
|
|
88
|
-
raise ArgumentError, "Missing required option: #{config[:keys].first}"
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
private_class_method def self.validate_option_value!(opts, config)
|
|
92
|
-
validator = config[:validator]
|
|
93
|
-
return unless validator
|
|
94
|
-
|
|
95
|
-
user_key = config[:keys].find { |k| opts.key?(k) }
|
|
96
|
-
return unless user_key # Don't validate if the user didn't provide the option
|
|
97
|
-
|
|
98
|
-
return if validator.call(opts[user_key])
|
|
99
|
-
|
|
100
|
-
raise ArgumentError, "Invalid value for option: #{user_key}"
|
|
101
|
-
end
|
|
102
|
-
end
|
|
103
|
-
end
|
data/lib/git/deprecation.rb
DELETED