git 5.0.0.beta.3 → 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 +47 -12
- 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 +123 -63
- 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 +21 -7
- 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 +398 -314
- data/redesign/3_architecture_implementation.md +59 -29
- 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 -57
- 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/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
|
@@ -62,7 +62,12 @@ module Git
|
|
|
62
62
|
operand :value_regex
|
|
63
63
|
end
|
|
64
64
|
|
|
65
|
-
# @!method call(*, **)
|
|
65
|
+
# @!method call(*, **options)
|
|
66
|
+
#
|
|
67
|
+
# @param options [Hash] command options
|
|
68
|
+
#
|
|
69
|
+
# @option options [Boolean, nil] :replace_all (nil) command option key;
|
|
70
|
+
# see overload docs for the full option list
|
|
66
71
|
#
|
|
67
72
|
# @overload call(name, value, value_regex = nil, **options)
|
|
68
73
|
#
|
|
@@ -103,7 +108,7 @@ module Git
|
|
|
103
108
|
# @option options [Boolean, nil] :no_type (nil) unset the previously set type specifier;
|
|
104
109
|
# `true` emits `--no-type`
|
|
105
110
|
#
|
|
106
|
-
# @return [Git::
|
|
111
|
+
# @return [Git::CommandLine::Result] the result of calling `git config`
|
|
107
112
|
#
|
|
108
113
|
# @raise [ArgumentError] if unsupported options are provided
|
|
109
114
|
#
|
|
@@ -50,9 +50,7 @@ module Git
|
|
|
50
50
|
# git config --unset exits 5 when trying to unset a non-existent or multi-valued key
|
|
51
51
|
allow_exit_status 0..5
|
|
52
52
|
|
|
53
|
-
#
|
|
54
|
-
#
|
|
55
|
-
# @overload call(name, value_regex = nil, **options)
|
|
53
|
+
# @overload call(name, value_regex = nil, **options)
|
|
56
54
|
#
|
|
57
55
|
# Execute the `git config --unset` command
|
|
58
56
|
#
|
|
@@ -78,11 +76,16 @@ module Git
|
|
|
78
76
|
#
|
|
79
77
|
# @option options [Boolean, nil] :fixed_value (nil) treat the value regex as an exact string
|
|
80
78
|
#
|
|
81
|
-
# @return [Git::
|
|
79
|
+
# @return [Git::CommandLine::Result] the result of calling `git config --unset`
|
|
82
80
|
#
|
|
83
81
|
# @raise [ArgumentError] if unsupported options are provided
|
|
84
82
|
#
|
|
85
83
|
# @raise [Git::FailedError] if git exits outside the allowed range (exit code > 5)
|
|
84
|
+
#
|
|
85
|
+
# @api public
|
|
86
|
+
def call(*, **)
|
|
87
|
+
super
|
|
88
|
+
end
|
|
86
89
|
end
|
|
87
90
|
end
|
|
88
91
|
end
|
|
@@ -50,7 +50,12 @@ module Git
|
|
|
50
50
|
# git config --unset-all exits 5 when trying to unset a non-existent key
|
|
51
51
|
allow_exit_status 0..5
|
|
52
52
|
|
|
53
|
-
# @!method call(*, **)
|
|
53
|
+
# @!method call(*, **options)
|
|
54
|
+
#
|
|
55
|
+
# @param options [Hash] command options
|
|
56
|
+
#
|
|
57
|
+
# @option options [Boolean, nil] :global (nil) command option key; see
|
|
58
|
+
# overload docs for the full option list
|
|
54
59
|
#
|
|
55
60
|
# @overload call(name, value_regex = nil, **options)
|
|
56
61
|
#
|
|
@@ -78,7 +83,7 @@ module Git
|
|
|
78
83
|
#
|
|
79
84
|
# @option options [Boolean, nil] :fixed_value (nil) treat the value regex as an exact string
|
|
80
85
|
#
|
|
81
|
-
# @return [Git::
|
|
86
|
+
# @return [Git::CommandLine::Result] the result of calling `git config --unset-all`
|
|
82
87
|
#
|
|
83
88
|
# @raise [ArgumentError] if unsupported options are provided
|
|
84
89
|
#
|
|
@@ -64,9 +64,7 @@ module Git
|
|
|
64
64
|
operand :commit_ish, repeatable: true
|
|
65
65
|
end
|
|
66
66
|
|
|
67
|
-
#
|
|
68
|
-
#
|
|
69
|
-
# @overload call(*commit_ish, **options)
|
|
67
|
+
# @overload call(*commit_ish, **options)
|
|
70
68
|
#
|
|
71
69
|
# Execute the `git describe` command
|
|
72
70
|
#
|
|
@@ -141,7 +139,7 @@ module Git
|
|
|
141
139
|
# @option options [Boolean, nil] :first_parent (nil) follow only the
|
|
142
140
|
# first parent of a merge commit
|
|
143
141
|
#
|
|
144
|
-
# @return [Git::
|
|
142
|
+
# @return [Git::CommandLine::Result] the result of calling
|
|
145
143
|
# `git describe`
|
|
146
144
|
#
|
|
147
145
|
# @raise [ArgumentError] if unsupported options are provided
|
|
@@ -150,6 +148,9 @@ module Git
|
|
|
150
148
|
# status
|
|
151
149
|
#
|
|
152
150
|
# @api public
|
|
151
|
+
def call(*, **)
|
|
152
|
+
super
|
|
153
|
+
end
|
|
153
154
|
end
|
|
154
155
|
end
|
|
155
156
|
end
|
data/lib/git/commands/diff.rb
CHANGED
|
@@ -155,9 +155,7 @@ module Git
|
|
|
155
155
|
# with --check: 2 = whitespace/conflict-marker errors
|
|
156
156
|
allow_exit_status 0..2
|
|
157
157
|
|
|
158
|
-
#
|
|
159
|
-
#
|
|
160
|
-
# @overload call(**options)
|
|
158
|
+
# @overload call(**options)
|
|
161
159
|
#
|
|
162
160
|
# Compare the index to the working tree
|
|
163
161
|
#
|
|
@@ -166,7 +164,7 @@ module Git
|
|
|
166
164
|
#
|
|
167
165
|
# @param options [Hash] command options
|
|
168
166
|
#
|
|
169
|
-
# @return [Git::
|
|
167
|
+
# @return [Git::CommandLine::Result] the result of calling `git diff`
|
|
170
168
|
#
|
|
171
169
|
# @raise [ArgumentError] if unsupported options are provided
|
|
172
170
|
#
|
|
@@ -175,7 +173,7 @@ module Git
|
|
|
175
173
|
#
|
|
176
174
|
# @api public
|
|
177
175
|
#
|
|
178
|
-
#
|
|
176
|
+
# @overload call(no_index: true, path:, **options)
|
|
179
177
|
#
|
|
180
178
|
# Compare two paths on the filesystem (outside git)
|
|
181
179
|
#
|
|
@@ -191,7 +189,7 @@ module Git
|
|
|
191
189
|
#
|
|
192
190
|
# @param options [Hash] command options
|
|
193
191
|
#
|
|
194
|
-
# @return [Git::
|
|
192
|
+
# @return [Git::CommandLine::Result] the result of calling `git diff`
|
|
195
193
|
#
|
|
196
194
|
# @raise [ArgumentError] if unsupported options are provided
|
|
197
195
|
#
|
|
@@ -200,7 +198,7 @@ module Git
|
|
|
200
198
|
#
|
|
201
199
|
# @api public
|
|
202
200
|
#
|
|
203
|
-
#
|
|
201
|
+
# @overload call(commit = nil, cached:, **options)
|
|
204
202
|
#
|
|
205
203
|
# Compare the index to HEAD or the named commit
|
|
206
204
|
#
|
|
@@ -213,7 +211,7 @@ module Git
|
|
|
213
211
|
#
|
|
214
212
|
# @param options [Hash] command options
|
|
215
213
|
#
|
|
216
|
-
# @return [Git::
|
|
214
|
+
# @return [Git::CommandLine::Result] the result of calling `git diff`
|
|
217
215
|
#
|
|
218
216
|
# @raise [ArgumentError] if unsupported options are provided
|
|
219
217
|
#
|
|
@@ -222,7 +220,7 @@ module Git
|
|
|
222
220
|
#
|
|
223
221
|
# @api public
|
|
224
222
|
#
|
|
225
|
-
#
|
|
223
|
+
# @overload call(commit, **options)
|
|
226
224
|
#
|
|
227
225
|
# Compare the working tree to the named commit
|
|
228
226
|
#
|
|
@@ -234,7 +232,7 @@ module Git
|
|
|
234
232
|
#
|
|
235
233
|
# @param options [Hash] command options
|
|
236
234
|
#
|
|
237
|
-
# @return [Git::
|
|
235
|
+
# @return [Git::CommandLine::Result] the result of calling `git diff`
|
|
238
236
|
#
|
|
239
237
|
# @raise [ArgumentError] if unsupported options are provided
|
|
240
238
|
#
|
|
@@ -243,7 +241,7 @@ module Git
|
|
|
243
241
|
#
|
|
244
242
|
# @api public
|
|
245
243
|
#
|
|
246
|
-
#
|
|
244
|
+
# @overload call(commit, *commits, **options)
|
|
247
245
|
#
|
|
248
246
|
# Compare two or more commits or show a combined diff
|
|
249
247
|
#
|
|
@@ -642,7 +640,7 @@ module Git
|
|
|
642
640
|
# @option options [Array<String>] :path (nil) zero or more paths
|
|
643
641
|
# to limit diff to
|
|
644
642
|
#
|
|
645
|
-
# @return [Git::
|
|
643
|
+
# @return [Git::CommandLine::Result] the result of calling
|
|
646
644
|
# `git diff`
|
|
647
645
|
#
|
|
648
646
|
# @raise [ArgumentError] if unsupported options are provided
|
|
@@ -651,6 +649,9 @@ module Git
|
|
|
651
649
|
# range (exit code > 2)
|
|
652
650
|
#
|
|
653
651
|
# @api public
|
|
652
|
+
def call(*, **)
|
|
653
|
+
super
|
|
654
|
+
end
|
|
654
655
|
end
|
|
655
656
|
end
|
|
656
657
|
end
|
|
@@ -153,9 +153,7 @@ module Git
|
|
|
153
153
|
# git diff-files exits 1 when differences are found (not an error)
|
|
154
154
|
allow_exit_status 0..1
|
|
155
155
|
|
|
156
|
-
#
|
|
157
|
-
#
|
|
158
|
-
# @overload call(**options)
|
|
156
|
+
# @overload call(**options)
|
|
159
157
|
# Compare the index to the working tree with no path restriction
|
|
160
158
|
#
|
|
161
159
|
# @param options [Hash] command options
|
|
@@ -489,7 +487,7 @@ module Git
|
|
|
489
487
|
# @option options [Integer, String] :max_depth (nil) maximum directory depth to
|
|
490
488
|
# descend for pathspecs
|
|
491
489
|
#
|
|
492
|
-
# @return [Git::
|
|
490
|
+
# @return [Git::CommandLine::Result] the result of calling `git diff-files`
|
|
493
491
|
#
|
|
494
492
|
# @raise [ArgumentError] if unsupported options are provided
|
|
495
493
|
#
|
|
@@ -498,14 +496,14 @@ module Git
|
|
|
498
496
|
#
|
|
499
497
|
# @api public
|
|
500
498
|
#
|
|
501
|
-
#
|
|
499
|
+
# @overload call(*path, **options)
|
|
502
500
|
# Compare the index to the working tree, limiting output to specific paths
|
|
503
501
|
#
|
|
504
502
|
# @param path [Array<String>] pathspecs limiting which files are compared
|
|
505
503
|
#
|
|
506
504
|
# @param options [Hash] command options (same as the no-path overload)
|
|
507
505
|
#
|
|
508
|
-
# @return [Git::
|
|
506
|
+
# @return [Git::CommandLine::Result] the result of calling `git diff-files`
|
|
509
507
|
#
|
|
510
508
|
# @raise [ArgumentError] if unsupported options are provided
|
|
511
509
|
#
|
|
@@ -513,6 +511,9 @@ module Git
|
|
|
513
511
|
# (exit code > 1)
|
|
514
512
|
#
|
|
515
513
|
# @api public
|
|
514
|
+
def call(*, **)
|
|
515
|
+
super
|
|
516
|
+
end
|
|
516
517
|
end
|
|
517
518
|
end
|
|
518
519
|
end
|
|
@@ -161,9 +161,7 @@ module Git
|
|
|
161
161
|
# git diff-index exits 1 when differences are found (e.g. with --exit-code)
|
|
162
162
|
allow_exit_status 0..1
|
|
163
163
|
|
|
164
|
-
#
|
|
165
|
-
#
|
|
166
|
-
# @overload call(tree_ish, **options)
|
|
164
|
+
# @overload call(tree_ish, **options)
|
|
167
165
|
# Compare a tree to the index or working tree
|
|
168
166
|
#
|
|
169
167
|
# @example Compare HEAD to the working tree
|
|
@@ -461,13 +459,15 @@ module Git
|
|
|
461
459
|
# @option options [Integer, String] :max_depth (nil) maximum directory depth to descend for
|
|
462
460
|
# each pathspec (tree-to-tree diffs only)
|
|
463
461
|
#
|
|
464
|
-
# @return [Git::
|
|
462
|
+
# @return [Git::CommandLine::Result] the result of calling `git diff-index`
|
|
465
463
|
#
|
|
466
464
|
# @raise [ArgumentError] if unsupported options are provided
|
|
467
465
|
#
|
|
468
466
|
# @raise [Git::FailedError] if git exits outside the allowed range (exit code > 1)
|
|
469
467
|
#
|
|
470
|
-
#
|
|
468
|
+
# @api public
|
|
469
|
+
#
|
|
470
|
+
# @overload call(tree_ish, *paths, **options)
|
|
471
471
|
# Compare a tree to the index or working tree, limiting output to specific paths
|
|
472
472
|
#
|
|
473
473
|
# @example Compare HEAD to the index for a single directory
|
|
@@ -484,13 +484,16 @@ module Git
|
|
|
484
484
|
#
|
|
485
485
|
# @param options [Hash] command options (same as the single-argument overload)
|
|
486
486
|
#
|
|
487
|
-
# @return [Git::
|
|
487
|
+
# @return [Git::CommandLine::Result] the result of calling `git diff-index`
|
|
488
488
|
#
|
|
489
489
|
# @raise [ArgumentError] if unsupported options are provided
|
|
490
490
|
#
|
|
491
491
|
# @raise [Git::FailedError] if git exits outside the allowed range (exit code > 1)
|
|
492
492
|
#
|
|
493
|
-
#
|
|
493
|
+
# @api public
|
|
494
|
+
def call(*, **)
|
|
495
|
+
super
|
|
496
|
+
end
|
|
494
497
|
end
|
|
495
498
|
end
|
|
496
499
|
end
|
data/lib/git/commands/fetch.rb
CHANGED
|
@@ -116,9 +116,7 @@ module Git
|
|
|
116
116
|
operand :refspec, repeatable: true
|
|
117
117
|
end
|
|
118
118
|
|
|
119
|
-
#
|
|
120
|
-
#
|
|
121
|
-
# @overload call(repository = nil, *refspec, **options)
|
|
119
|
+
# @overload call(repository = nil, *refspec, **options)
|
|
122
120
|
#
|
|
123
121
|
# Execute the `git fetch` command
|
|
124
122
|
#
|
|
@@ -340,13 +338,17 @@ module Git
|
|
|
340
338
|
# Pass `true` to capture git fetch output (which is written to stderr
|
|
341
339
|
# by default).
|
|
342
340
|
#
|
|
343
|
-
# @return [Git::
|
|
341
|
+
# @return [Git::CommandLine::Result] the result of calling `git fetch`
|
|
344
342
|
#
|
|
345
343
|
# @raise [ArgumentError] if unsupported options are provided
|
|
346
344
|
#
|
|
347
345
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
348
346
|
#
|
|
349
347
|
# @api public
|
|
348
|
+
#
|
|
349
|
+
def call(*, **)
|
|
350
|
+
super
|
|
351
|
+
end
|
|
350
352
|
end
|
|
351
353
|
end
|
|
352
354
|
end
|
data/lib/git/commands/fsck.rb
CHANGED
|
@@ -55,9 +55,7 @@ module Git
|
|
|
55
55
|
# git fsck uses exit codes 0-7 as bit flags for findings
|
|
56
56
|
allow_exit_status 0..7
|
|
57
57
|
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
# @overload call(*object, **options)
|
|
58
|
+
# @overload call(*object, **options)
|
|
61
59
|
#
|
|
62
60
|
# Execute the `git fsck` command
|
|
63
61
|
#
|
|
@@ -123,7 +121,7 @@ module Git
|
|
|
123
121
|
# @option options [Boolean, nil] :no_references (nil) skip reference checking
|
|
124
122
|
# (`--no-references`)
|
|
125
123
|
#
|
|
126
|
-
# @return [Git::
|
|
124
|
+
# @return [Git::CommandLine::Result] the result of calling `git fsck`
|
|
127
125
|
#
|
|
128
126
|
# @raise [ArgumentError] if unsupported options are provided
|
|
129
127
|
#
|
|
@@ -131,6 +129,10 @@ module Git
|
|
|
131
129
|
# (exit code > 7)
|
|
132
130
|
#
|
|
133
131
|
# @api public
|
|
132
|
+
#
|
|
133
|
+
def call(*, **)
|
|
134
|
+
super
|
|
135
|
+
end
|
|
134
136
|
end
|
|
135
137
|
end
|
|
136
138
|
end
|
data/lib/git/commands/gc.rb
CHANGED
|
@@ -53,9 +53,7 @@ module Git
|
|
|
53
53
|
flag_option :keep_largest_pack
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
# @overload call(**options)
|
|
56
|
+
# @overload call(**options)
|
|
59
57
|
#
|
|
60
58
|
# Execute the `git gc` command
|
|
61
59
|
#
|
|
@@ -120,13 +118,17 @@ module Git
|
|
|
120
118
|
#
|
|
121
119
|
# When `true`, `gc.bigPackThreshold` is ignored.
|
|
122
120
|
#
|
|
123
|
-
# @return [Git::
|
|
121
|
+
# @return [Git::CommandLine::Result] the result of calling `git gc`
|
|
124
122
|
#
|
|
125
123
|
# @raise [ArgumentError] if unsupported options are provided
|
|
126
124
|
#
|
|
127
125
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
128
126
|
#
|
|
129
127
|
# @api public
|
|
128
|
+
#
|
|
129
|
+
def call(*, **)
|
|
130
|
+
super
|
|
131
|
+
end
|
|
130
132
|
end
|
|
131
133
|
end
|
|
132
134
|
end
|
data/lib/git/commands/grep.rb
CHANGED
|
@@ -112,9 +112,7 @@ module Git
|
|
|
112
112
|
# `git grep` exits with 1 when no lines are selected — not an error
|
|
113
113
|
allow_exit_status 0..1
|
|
114
114
|
|
|
115
|
-
#
|
|
116
|
-
#
|
|
117
|
-
# @overload call(*tree, **options)
|
|
115
|
+
# @overload call(*tree, **options)
|
|
118
116
|
#
|
|
119
117
|
# Execute the `git grep` command
|
|
120
118
|
#
|
|
@@ -319,7 +317,7 @@ module Git
|
|
|
319
317
|
# Multiple pathspecs may be passed as an Array. Appended to the
|
|
320
318
|
# command after `--`.
|
|
321
319
|
#
|
|
322
|
-
# @return [Git::
|
|
320
|
+
# @return [Git::CommandLine::Result] the result of calling `git grep`
|
|
323
321
|
#
|
|
324
322
|
# Exit status 0 means matches were found; exit status 1 means no
|
|
325
323
|
# lines were selected (not an error).
|
|
@@ -331,8 +329,11 @@ module Git
|
|
|
331
329
|
# @raise [Git::FailedError] if git exits outside the allowed range
|
|
332
330
|
# (exit code > 1)
|
|
333
331
|
#
|
|
334
|
-
#
|
|
332
|
+
# @api public
|
|
335
333
|
#
|
|
334
|
+
def call(*, **)
|
|
335
|
+
super
|
|
336
|
+
end
|
|
336
337
|
end
|
|
337
338
|
end
|
|
338
339
|
end
|
data/lib/git/commands/init.rb
CHANGED
|
@@ -40,9 +40,7 @@ module Git
|
|
|
40
40
|
operand :directory
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
# @overload call(directory = nil, **options)
|
|
43
|
+
# @overload call(directory = nil, **options)
|
|
46
44
|
#
|
|
47
45
|
# Execute the `git init` command
|
|
48
46
|
#
|
|
@@ -87,13 +85,17 @@ module Git
|
|
|
87
85
|
# Pass a string (e.g. `'group'`, `'all'`, `'0660'`) to emit
|
|
88
86
|
# `--shared=<permissions>`.
|
|
89
87
|
#
|
|
90
|
-
# @return [Git::
|
|
88
|
+
# @return [Git::CommandLine::Result] the result of calling `git init`
|
|
91
89
|
#
|
|
92
90
|
# @raise [ArgumentError] if unsupported options are provided
|
|
93
91
|
#
|
|
94
92
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
95
93
|
#
|
|
96
94
|
# @api public
|
|
95
|
+
#
|
|
96
|
+
def call(*, **)
|
|
97
|
+
super
|
|
98
|
+
end
|
|
97
99
|
end
|
|
98
100
|
end
|
|
99
101
|
end
|