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
|
@@ -28,7 +28,12 @@ module Git
|
|
|
28
28
|
execution_option :env
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
# @!method call(*, **)
|
|
31
|
+
# @!method call(*, **options)
|
|
32
|
+
#
|
|
33
|
+
# @param options [Hash] command options
|
|
34
|
+
#
|
|
35
|
+
# @option options [Hash] :env (nil) command option key; see overload docs
|
|
36
|
+
# for the full option list
|
|
32
37
|
#
|
|
33
38
|
# @overload call(**options)
|
|
34
39
|
#
|
|
@@ -42,7 +47,7 @@ module Git
|
|
|
42
47
|
# @option options [Hash] :env (nil) environment variables to set for the git
|
|
43
48
|
# process; merged with the default environment; not passed to the git CLI
|
|
44
49
|
#
|
|
45
|
-
# @return [Git::
|
|
50
|
+
# @return [Git::CommandLine::Result] the result of calling `git maintenance stop`
|
|
46
51
|
#
|
|
47
52
|
# @raise [ArgumentError] if unsupported options are provided
|
|
48
53
|
#
|
|
@@ -33,7 +33,12 @@ module Git
|
|
|
33
33
|
execution_option :env
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
# @!method call(*, **)
|
|
36
|
+
# @!method call(*, **options)
|
|
37
|
+
#
|
|
38
|
+
# @param options [Hash] command options
|
|
39
|
+
#
|
|
40
|
+
# @option options [Boolean, String, nil] :config_file (nil) command option key;
|
|
41
|
+
# see overload docs for the full option list
|
|
37
42
|
#
|
|
38
43
|
# @overload call(**options)
|
|
39
44
|
#
|
|
@@ -64,7 +69,7 @@ module Git
|
|
|
64
69
|
# @option options [Hash] :env (nil) environment variables to set for the git
|
|
65
70
|
# process; merged with the default environment; not passed to the git CLI
|
|
66
71
|
#
|
|
67
|
-
# @return [Git::
|
|
72
|
+
# @return [Git::CommandLine::Result] the result of calling `git maintenance unregister`
|
|
68
73
|
#
|
|
69
74
|
# @raise [ArgumentError] if unsupported options are provided
|
|
70
75
|
#
|
|
@@ -28,13 +28,13 @@ module Git
|
|
|
28
28
|
literal '--abort'
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
# @!method call(
|
|
31
|
+
# @!method call()
|
|
32
32
|
#
|
|
33
33
|
# @overload call()
|
|
34
34
|
#
|
|
35
35
|
# Abort the current merge and reconstruct the pre-merge state
|
|
36
36
|
#
|
|
37
|
-
# @return [Git::
|
|
37
|
+
# @return [Git::CommandLine::Result] the result of calling
|
|
38
38
|
# `git merge --abort`
|
|
39
39
|
#
|
|
40
40
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
@@ -28,13 +28,13 @@ module Git
|
|
|
28
28
|
literal '--continue'
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
# @!method call(
|
|
31
|
+
# @!method call()
|
|
32
32
|
#
|
|
33
33
|
# @overload call()
|
|
34
34
|
#
|
|
35
35
|
# Resume the in-progress merge after conflicts have been resolved
|
|
36
36
|
#
|
|
37
|
-
# @return [Git::
|
|
37
|
+
# @return [Git::CommandLine::Result] the result of calling
|
|
38
38
|
# `git merge --continue`
|
|
39
39
|
#
|
|
40
40
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
@@ -29,14 +29,14 @@ module Git
|
|
|
29
29
|
literal '--quit'
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
# @!method call(
|
|
32
|
+
# @!method call()
|
|
33
33
|
#
|
|
34
34
|
# @overload call()
|
|
35
35
|
#
|
|
36
36
|
# Forget about the current merge in progress, leaving the index
|
|
37
37
|
# and working tree as-is
|
|
38
38
|
#
|
|
39
|
-
# @return [Git::
|
|
39
|
+
# @return [Git::CommandLine::Result] the result of calling
|
|
40
40
|
# `git merge --quit`
|
|
41
41
|
#
|
|
42
42
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
@@ -99,7 +99,12 @@ module Git
|
|
|
99
99
|
operand :commit, repeatable: true, required: true
|
|
100
100
|
end
|
|
101
101
|
|
|
102
|
-
# @!method call(*, **)
|
|
102
|
+
# @!method call(*, **options)
|
|
103
|
+
#
|
|
104
|
+
# @param options [Hash] command options
|
|
105
|
+
#
|
|
106
|
+
# @option options [Boolean, nil] :commit (nil) command option key; see overload
|
|
107
|
+
# docs for the full option list
|
|
103
108
|
#
|
|
104
109
|
# @overload call(*commit, **options)
|
|
105
110
|
#
|
|
@@ -234,7 +239,7 @@ module Git
|
|
|
234
239
|
# @option options [Boolean, nil] :no_overwrite_ignore (nil) abort if the merge result
|
|
235
240
|
# would overwrite any ignored files (`--no-overwrite-ignore`)
|
|
236
241
|
#
|
|
237
|
-
# @return [Git::
|
|
242
|
+
# @return [Git::CommandLine::Result] the result of calling `git merge`
|
|
238
243
|
#
|
|
239
244
|
# @raise [ArgumentError] if unsupported options are provided
|
|
240
245
|
#
|
data/lib/git/commands/merge.rb
CHANGED
|
@@ -18,10 +18,10 @@ module Git
|
|
|
18
18
|
# - {Merge::Quit} — forget the in-progress merge but leave the working tree
|
|
19
19
|
# as-is (`--quit`)
|
|
20
20
|
#
|
|
21
|
-
# @api private
|
|
22
|
-
#
|
|
23
21
|
# @see https://git-scm.com/docs/git-merge git-merge documentation
|
|
24
22
|
#
|
|
23
|
+
# @api private
|
|
24
|
+
#
|
|
25
25
|
module Merge
|
|
26
26
|
end
|
|
27
27
|
end
|
|
@@ -46,7 +46,12 @@ module Git
|
|
|
46
46
|
# ancestor (both are valid non-error exits)
|
|
47
47
|
allow_exit_status 0..1
|
|
48
48
|
|
|
49
|
-
# @!method call(*, **)
|
|
49
|
+
# @!method call(*, **options)
|
|
50
|
+
#
|
|
51
|
+
# @param options [Hash] command options
|
|
52
|
+
#
|
|
53
|
+
# @option options [Boolean, nil] :octopus (nil) command option key; see overload docs
|
|
54
|
+
# for the full option list
|
|
50
55
|
#
|
|
51
56
|
# @overload call(*commit, **options)
|
|
52
57
|
#
|
|
@@ -74,7 +79,7 @@ module Git
|
|
|
74
79
|
#
|
|
75
80
|
# Alias: :a
|
|
76
81
|
#
|
|
77
|
-
# @return [Git::
|
|
82
|
+
# @return [Git::CommandLine::Result] the result of calling
|
|
78
83
|
# `git merge-base`
|
|
79
84
|
#
|
|
80
85
|
# @raise [ArgumentError] if unsupported options are provided
|
data/lib/git/commands/mv.rb
CHANGED
|
@@ -41,7 +41,12 @@ module Git
|
|
|
41
41
|
operand :destination, required: true
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
-
# @!method call(*, **)
|
|
44
|
+
# @!method call(*, **options)
|
|
45
|
+
#
|
|
46
|
+
# @param options [Hash] command options
|
|
47
|
+
#
|
|
48
|
+
# @option options [Boolean, nil] :verbose (nil) command option key; see overload
|
|
49
|
+
# docs for the full option list
|
|
45
50
|
#
|
|
46
51
|
# @overload call(*source, destination, **options)
|
|
47
52
|
#
|
|
@@ -67,7 +72,7 @@ module Git
|
|
|
67
72
|
#
|
|
68
73
|
# @option options [Boolean, nil] :k (nil) skip move or rename actions which would lead to an error
|
|
69
74
|
#
|
|
70
|
-
# @return [Git::
|
|
75
|
+
# @return [Git::CommandLine::Result] the result of calling `git mv`
|
|
71
76
|
#
|
|
72
77
|
# @raise [ArgumentError] if unsupported options are provided
|
|
73
78
|
#
|
|
@@ -54,7 +54,12 @@ module Git
|
|
|
54
54
|
operand :commit_ish, repeatable: true
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
# @!method call(*, **)
|
|
57
|
+
# @!method call(*, **options)
|
|
58
|
+
#
|
|
59
|
+
# @param options [Hash] command options
|
|
60
|
+
#
|
|
61
|
+
# @option options [Boolean, nil] :tags (nil) command option key; see overload docs
|
|
62
|
+
# for the full option list
|
|
58
63
|
#
|
|
59
64
|
# @overload call(*commit_ish, **options)
|
|
60
65
|
#
|
|
@@ -103,7 +108,7 @@ module Git
|
|
|
103
108
|
# @option options [Boolean, nil] :always (nil) show uniquely abbreviated
|
|
104
109
|
# commit object as fallback
|
|
105
110
|
#
|
|
106
|
-
# @return [Git::
|
|
111
|
+
# @return [Git::CommandLine::Result] the result of calling
|
|
107
112
|
# `git name-rev`
|
|
108
113
|
#
|
|
109
114
|
# @raise [ArgumentError] if unsupported options are provided
|
data/lib/git/commands/pull.rb
CHANGED
|
@@ -112,7 +112,12 @@ module Git
|
|
|
112
112
|
operand :refspec, repeatable: true
|
|
113
113
|
end
|
|
114
114
|
|
|
115
|
-
# @!method call(*, **)
|
|
115
|
+
# @!method call(*, **options)
|
|
116
|
+
#
|
|
117
|
+
# @param options [Hash] command options
|
|
118
|
+
#
|
|
119
|
+
# @option options [Boolean, nil] :quiet (nil) command option key; see overload
|
|
120
|
+
# docs for the full option list
|
|
116
121
|
#
|
|
117
122
|
# Execute the `git pull` command
|
|
118
123
|
#
|
|
@@ -366,7 +371,7 @@ module Git
|
|
|
366
371
|
#
|
|
367
372
|
# If nil, uses the global timeout from {Git::Config}.
|
|
368
373
|
#
|
|
369
|
-
# @return [Git::
|
|
374
|
+
# @return [Git::CommandLine::Result] the result of calling `git pull`
|
|
370
375
|
#
|
|
371
376
|
# @raise [ArgumentError] if argument validation fails (e.g., unsupported options
|
|
372
377
|
# are provided or option values are invalid)
|
data/lib/git/commands/push.rb
CHANGED
|
@@ -106,7 +106,12 @@ module Git
|
|
|
106
106
|
operand :refspec, repeatable: true
|
|
107
107
|
end
|
|
108
108
|
|
|
109
|
-
# @!method call(*, **)
|
|
109
|
+
# @!method call(*, **options)
|
|
110
|
+
#
|
|
111
|
+
# @param options [Hash] command options
|
|
112
|
+
#
|
|
113
|
+
# @option options [Boolean, nil] :all (nil) command option key; see overload docs
|
|
114
|
+
# for the full option list
|
|
110
115
|
#
|
|
111
116
|
# Execute the `git push` command
|
|
112
117
|
#
|
|
@@ -235,7 +240,7 @@ module Git
|
|
|
235
240
|
#
|
|
236
241
|
# @option options [Integer] :timeout (nil) maximum seconds to wait for the command to complete
|
|
237
242
|
#
|
|
238
|
-
# @return [Git::
|
|
243
|
+
# @return [Git::CommandLine::Result] the result of calling `git push`
|
|
239
244
|
#
|
|
240
245
|
# @raise [ArgumentError] if unsupported options are provided
|
|
241
246
|
#
|
|
@@ -67,7 +67,12 @@ module Git
|
|
|
67
67
|
operand :tree_ish, repeatable: true
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
-
# @!method call(*, **)
|
|
70
|
+
# @!method call(*, **options)
|
|
71
|
+
#
|
|
72
|
+
# @param options [Hash] command options
|
|
73
|
+
#
|
|
74
|
+
# @option options [Boolean, nil] :m (nil) command option key; see overload docs
|
|
75
|
+
# for the full option list
|
|
71
76
|
#
|
|
72
77
|
# @overload call(*tree_ish, **options)
|
|
73
78
|
#
|
|
@@ -137,7 +142,7 @@ module Git
|
|
|
137
142
|
#
|
|
138
143
|
# Alias: `:q`
|
|
139
144
|
#
|
|
140
|
-
# @return [Git::
|
|
145
|
+
# @return [Git::CommandLine::Result] the result of calling
|
|
141
146
|
# `git read-tree`
|
|
142
147
|
#
|
|
143
148
|
# @raise [ArgumentError] if unsupported options are provided
|
|
@@ -46,7 +46,12 @@ module Git
|
|
|
46
46
|
operand :url, required: true
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
# @!method call(*, **)
|
|
49
|
+
# @!method call(*, **options)
|
|
50
|
+
#
|
|
51
|
+
# @param options [Hash] command options
|
|
52
|
+
#
|
|
53
|
+
# @option options [String, Array<String>] :track (nil) command option key; see
|
|
54
|
+
# overload docs for the full option list
|
|
50
55
|
#
|
|
51
56
|
# @overload call(name, url, **options)
|
|
52
57
|
#
|
|
@@ -80,7 +85,7 @@ module Git
|
|
|
80
85
|
#
|
|
81
86
|
# Common values are `'fetch'` and `'push'`.
|
|
82
87
|
#
|
|
83
|
-
# @return [Git::
|
|
88
|
+
# @return [Git::CommandLine::Result] the result of calling `git remote add`
|
|
84
89
|
#
|
|
85
90
|
# @raise [ArgumentError] if unsupported options are provided
|
|
86
91
|
#
|
|
@@ -41,7 +41,7 @@ module Git
|
|
|
41
41
|
operand :name, required: true
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
-
# @!method call(
|
|
44
|
+
# @!method call(*)
|
|
45
45
|
#
|
|
46
46
|
# @overload call(name, **options)
|
|
47
47
|
#
|
|
@@ -55,11 +55,13 @@ module Git
|
|
|
55
55
|
#
|
|
56
56
|
# @option options [Boolean, nil] :all (nil) return all configured URLs instead of only the first one
|
|
57
57
|
#
|
|
58
|
-
# @return [Git::
|
|
58
|
+
# @return [Git::CommandLine::Result] the result of calling `git remote get-url`
|
|
59
59
|
#
|
|
60
60
|
# @raise [ArgumentError] if unsupported options are provided
|
|
61
61
|
#
|
|
62
62
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
63
|
+
#
|
|
64
|
+
# @api public
|
|
63
65
|
end
|
|
64
66
|
end
|
|
65
67
|
end
|
|
@@ -31,7 +31,7 @@ module Git
|
|
|
31
31
|
flag_option %i[verbose v]
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
# @!method call(
|
|
34
|
+
# @!method call(*)
|
|
35
35
|
#
|
|
36
36
|
# @overload call(**options)
|
|
37
37
|
#
|
|
@@ -43,11 +43,13 @@ module Git
|
|
|
43
43
|
#
|
|
44
44
|
# Alias: :v
|
|
45
45
|
#
|
|
46
|
-
# @return [Git::
|
|
46
|
+
# @return [Git::CommandLine::Result] the result of calling `git remote`
|
|
47
47
|
#
|
|
48
48
|
# @raise [ArgumentError] if unsupported options are provided
|
|
49
49
|
#
|
|
50
50
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
51
|
+
#
|
|
52
|
+
# @api public
|
|
51
53
|
end
|
|
52
54
|
end
|
|
53
55
|
end
|
|
@@ -36,7 +36,7 @@ module Git
|
|
|
36
36
|
operand :name, repeatable: true, required: true
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
# @!method call(
|
|
39
|
+
# @!method call(*)
|
|
40
40
|
#
|
|
41
41
|
# @overload call(*name, **options)
|
|
42
42
|
#
|
|
@@ -50,11 +50,13 @@ module Git
|
|
|
50
50
|
#
|
|
51
51
|
# Alias: :n
|
|
52
52
|
#
|
|
53
|
-
# @return [Git::
|
|
53
|
+
# @return [Git::CommandLine::Result] the result of calling `git remote prune`
|
|
54
54
|
#
|
|
55
55
|
# @raise [ArgumentError] if unsupported options are provided
|
|
56
56
|
#
|
|
57
57
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
58
|
+
#
|
|
59
|
+
# @api public
|
|
58
60
|
end
|
|
59
61
|
end
|
|
60
62
|
end
|
|
@@ -35,7 +35,7 @@ module Git
|
|
|
35
35
|
operand :name, required: true
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
# @!method call(
|
|
38
|
+
# @!method call(*)
|
|
39
39
|
#
|
|
40
40
|
# @overload call(name)
|
|
41
41
|
#
|
|
@@ -43,9 +43,11 @@ module Git
|
|
|
43
43
|
#
|
|
44
44
|
# @param name [String] the remote name to remove
|
|
45
45
|
#
|
|
46
|
-
# @return [Git::
|
|
46
|
+
# @return [Git::CommandLine::Result] the result of calling `git remote remove`
|
|
47
47
|
#
|
|
48
48
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
49
|
+
#
|
|
50
|
+
# @api public
|
|
49
51
|
end
|
|
50
52
|
end
|
|
51
53
|
end
|
|
@@ -42,7 +42,7 @@ module Git
|
|
|
42
42
|
operand :new, required: true
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
# @!method call(
|
|
45
|
+
# @!method call(*)
|
|
46
46
|
#
|
|
47
47
|
# @overload call(old, new, **options)
|
|
48
48
|
#
|
|
@@ -58,11 +58,13 @@ module Git
|
|
|
58
58
|
#
|
|
59
59
|
# @option options [Boolean, nil] :no_progress (nil) suppress progress output (`--no-progress`)
|
|
60
60
|
#
|
|
61
|
-
# @return [Git::
|
|
61
|
+
# @return [Git::CommandLine::Result] the result of calling `git remote rename`
|
|
62
62
|
#
|
|
63
63
|
# @raise [ArgumentError] if unsupported options are provided
|
|
64
64
|
#
|
|
65
65
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
66
|
+
#
|
|
67
|
+
# @api public
|
|
66
68
|
end
|
|
67
69
|
end
|
|
68
70
|
end
|
|
@@ -38,7 +38,12 @@ module Git
|
|
|
38
38
|
operand :branch, repeatable: true, required: true
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
# @!method call(*, **)
|
|
41
|
+
# @!method call(*, **options)
|
|
42
|
+
#
|
|
43
|
+
# @param options [Hash] command options
|
|
44
|
+
#
|
|
45
|
+
# @option options [Boolean, nil] :add (nil) command option key; see
|
|
46
|
+
# overload docs for the full option list
|
|
42
47
|
#
|
|
43
48
|
# @overload call(name, *branch, **options)
|
|
44
49
|
#
|
|
@@ -52,11 +57,13 @@ module Git
|
|
|
52
57
|
#
|
|
53
58
|
# @option options [Boolean, nil] :add (nil) append the given branches instead of replacing them
|
|
54
59
|
#
|
|
55
|
-
# @return [Git::
|
|
60
|
+
# @return [Git::CommandLine::Result] the result of calling `git remote set-branches`
|
|
56
61
|
#
|
|
57
62
|
# @raise [ArgumentError] if unsupported options are provided
|
|
58
63
|
#
|
|
59
64
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
65
|
+
#
|
|
66
|
+
# @api public
|
|
60
67
|
end
|
|
61
68
|
end
|
|
62
69
|
end
|
|
@@ -39,7 +39,12 @@ module Git
|
|
|
39
39
|
operand :branch
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
# @!method call(*, **)
|
|
42
|
+
# @!method call(*, **options)
|
|
43
|
+
#
|
|
44
|
+
# @param options [Hash] command options
|
|
45
|
+
#
|
|
46
|
+
# @option options [Boolean, nil] :auto (nil) command option key; see
|
|
47
|
+
# overload docs for the full option list
|
|
43
48
|
#
|
|
44
49
|
# @overload call(name, branch)
|
|
45
50
|
#
|
|
@@ -49,12 +54,12 @@ module Git
|
|
|
49
54
|
#
|
|
50
55
|
# @param branch [String] the branch to set as the remote HEAD
|
|
51
56
|
#
|
|
52
|
-
# @return [Git::
|
|
53
|
-
#
|
|
54
|
-
# @raise [ArgumentError] if unsupported options are provided
|
|
57
|
+
# @return [Git::CommandLine::Result] the result of calling `git remote set-head`
|
|
55
58
|
#
|
|
56
59
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
57
60
|
#
|
|
61
|
+
# @api public
|
|
62
|
+
#
|
|
58
63
|
# @overload call(name, **options)
|
|
59
64
|
#
|
|
60
65
|
# Detect or delete the remote's HEAD symbolic ref
|
|
@@ -71,11 +76,13 @@ module Git
|
|
|
71
76
|
#
|
|
72
77
|
# Mutually exclusive with `:auto`. Alias: :d
|
|
73
78
|
#
|
|
74
|
-
# @return [Git::
|
|
79
|
+
# @return [Git::CommandLine::Result] the result of calling `git remote set-head`
|
|
75
80
|
#
|
|
76
81
|
# @raise [ArgumentError] if unsupported options are provided
|
|
77
82
|
#
|
|
78
83
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
84
|
+
#
|
|
85
|
+
# @api public
|
|
79
86
|
end
|
|
80
87
|
end
|
|
81
88
|
end
|
|
@@ -44,7 +44,12 @@ module Git
|
|
|
44
44
|
operand :oldurl
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
# @!method call(*, **)
|
|
47
|
+
# @!method call(*, **options)
|
|
48
|
+
#
|
|
49
|
+
# @param options [Hash] command options
|
|
50
|
+
#
|
|
51
|
+
# @option options [Boolean, nil] :push (nil) command option key; see
|
|
52
|
+
# overload docs for the full option list
|
|
48
53
|
#
|
|
49
54
|
# @overload call(name, newurl, oldurl = nil, **options)
|
|
50
55
|
#
|
|
@@ -60,11 +65,13 @@ module Git
|
|
|
60
65
|
#
|
|
61
66
|
# @option options [Boolean, nil] :push (nil) update push URLs instead of fetch URLs
|
|
62
67
|
#
|
|
63
|
-
# @return [Git::
|
|
68
|
+
# @return [Git::CommandLine::Result] the result of calling `git remote set-url`
|
|
64
69
|
#
|
|
65
70
|
# @raise [ArgumentError] if unsupported options are provided
|
|
66
71
|
#
|
|
67
72
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
73
|
+
#
|
|
74
|
+
# @api public
|
|
68
75
|
end
|
|
69
76
|
end
|
|
70
77
|
end
|
|
@@ -38,7 +38,12 @@ module Git
|
|
|
38
38
|
operand :newurl, required: true
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
# @!method call(*, **)
|
|
41
|
+
# @!method call(*, **options)
|
|
42
|
+
#
|
|
43
|
+
# @param options [Hash] command options
|
|
44
|
+
#
|
|
45
|
+
# @option options [Boolean, nil] :push (nil) command option key; see
|
|
46
|
+
# overload docs for the full option list
|
|
42
47
|
#
|
|
43
48
|
# @overload call(name, newurl, **options)
|
|
44
49
|
#
|
|
@@ -52,9 +57,13 @@ module Git
|
|
|
52
57
|
#
|
|
53
58
|
# @option options [Boolean, nil] :push (nil) add a push URL instead of a fetch URL
|
|
54
59
|
#
|
|
55
|
-
# @return [Git::
|
|
60
|
+
# @return [Git::CommandLine::Result] the result of calling `git remote set-url --add`
|
|
61
|
+
#
|
|
62
|
+
# @raise [ArgumentError] if unsupported options are provided
|
|
56
63
|
#
|
|
57
64
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
65
|
+
#
|
|
66
|
+
# @api public
|
|
58
67
|
end
|
|
59
68
|
end
|
|
60
69
|
end
|
|
@@ -39,7 +39,12 @@ module Git
|
|
|
39
39
|
operand :url, required: true
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
# @!method call(*, **)
|
|
42
|
+
# @!method call(*, **options)
|
|
43
|
+
#
|
|
44
|
+
# @param options [Hash] command options
|
|
45
|
+
#
|
|
46
|
+
# @option options [Boolean, nil] :push (nil) command option key; see
|
|
47
|
+
# overload docs for the full option list
|
|
43
48
|
#
|
|
44
49
|
# @overload call(name, url, **options)
|
|
45
50
|
#
|
|
@@ -53,11 +58,13 @@ module Git
|
|
|
53
58
|
#
|
|
54
59
|
# @option options [Boolean, nil] :push (nil) delete push URLs instead of fetch URLs
|
|
55
60
|
#
|
|
56
|
-
# @return [Git::
|
|
61
|
+
# @return [Git::CommandLine::Result] the result of calling `git remote set-url --delete`
|
|
57
62
|
#
|
|
58
63
|
# @raise [ArgumentError] if unsupported options are provided
|
|
59
64
|
#
|
|
60
65
|
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
66
|
+
#
|
|
67
|
+
# @api public
|
|
61
68
|
end
|
|
62
69
|
end
|
|
63
70
|
end
|
|
@@ -42,29 +42,35 @@ module Git
|
|
|
42
42
|
operand :name, repeatable: true, required: true
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
#
|
|
45
|
+
# @overload call(*name, **options)
|
|
46
46
|
#
|
|
47
|
-
#
|
|
47
|
+
# Execute the `git remote show` command
|
|
48
48
|
#
|
|
49
|
-
#
|
|
49
|
+
# @param name [Array<String>] one or more remote names to inspect
|
|
50
50
|
#
|
|
51
|
-
#
|
|
51
|
+
# @param options [Hash] command options
|
|
52
52
|
#
|
|
53
|
-
#
|
|
53
|
+
# @option options [Boolean, nil] :verbose (nil) show the remote URL after
|
|
54
|
+
# the remote name
|
|
54
55
|
#
|
|
55
|
-
#
|
|
56
|
+
# Alias: :v
|
|
56
57
|
#
|
|
57
|
-
#
|
|
58
|
+
# @option options [Boolean, nil] :n (nil) do not query remote heads with
|
|
59
|
+
# `git ls-remote`
|
|
58
60
|
#
|
|
59
|
-
#
|
|
61
|
+
# Uses cached information instead of contacting the remote server.
|
|
60
62
|
#
|
|
61
|
-
#
|
|
63
|
+
# @return [Git::CommandLine::Result] the result of calling `git remote show`
|
|
62
64
|
#
|
|
63
|
-
#
|
|
65
|
+
# @raise [ArgumentError] if unsupported options are provided
|
|
64
66
|
#
|
|
65
|
-
#
|
|
67
|
+
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
66
68
|
#
|
|
67
|
-
#
|
|
69
|
+
# @api public
|
|
70
|
+
#
|
|
71
|
+
def call(*, **)
|
|
72
|
+
super
|
|
73
|
+
end
|
|
68
74
|
end
|
|
69
75
|
end
|
|
70
76
|
end
|