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.
Files changed (268) hide show
  1. checksums.yaml +4 -4
  2. data/.dockerignore +27 -0
  3. data/.github/copilot-instructions.md +3 -8
  4. data/.github/hooks/bin-setup-on-worktree.json +11 -0
  5. data/.github/hooks/run-bin-setup-once.sh +14 -0
  6. data/.github/skills/breaking-change-analysis/SKILL.md +6 -9
  7. data/.github/skills/ci-cd-troubleshooting/SKILL.md +2 -2
  8. data/.github/skills/command-implementation/REFERENCE.md +34 -33
  9. data/.github/skills/command-implementation/SKILL.md +5 -4
  10. data/.github/skills/command-test-conventions/SKILL.md +13 -9
  11. data/.github/skills/command-yard-documentation/SKILL.md +14 -6
  12. data/.github/skills/development-workflow/SKILL.md +20 -14
  13. data/.github/skills/facade-implementation/REFERENCE.md +19 -22
  14. data/.github/skills/facade-implementation/SKILL.md +0 -5
  15. data/.github/skills/facade-test-conventions/SKILL.md +4 -7
  16. data/.github/skills/facade-yard-documentation/SKILL.md +8 -2
  17. data/.github/skills/make-skill-template/SKILL.md +53 -3
  18. data/.github/skills/pr-readiness-review/SKILL.md +22 -2
  19. data/.github/skills/project-context/SKILL.md +16 -23
  20. data/.github/skills/pull-request-review/SKILL.md +2 -2
  21. data/.github/skills/rebase/SKILL.md +148 -0
  22. data/.github/skills/refactor-command-to-commandlineresult/SKILL.md +1 -1
  23. data/.github/skills/resolve-feedback/SKILL.md +288 -0
  24. data/.github/skills/review-arguments-dsl/CHECKLIST.md +3 -3
  25. data/.github/skills/reviewing-skills/SKILL.md +28 -3
  26. data/.github/skills/test-debugging/SKILL.md +20 -19
  27. data/.github/skills/yard-documentation/SKILL.md +671 -483
  28. data/.github/skills/yard-documentation/element-rules.md +162 -0
  29. data/.github/skills-deprecated/README.md +21 -0
  30. data/.github/{skills → skills-deprecated}/extract-command-from-lib/SKILL.md +9 -9
  31. data/.github/{skills → skills-deprecated}/extract-facade-from-base-lib/SKILL.md +12 -12
  32. data/.github/workflows/continuous_integration.yml +3 -2
  33. data/.rubocop.yml +7 -39
  34. data/.yard-lint.yml +75 -0
  35. data/CONTRIBUTING.md +186 -174
  36. data/Gemfile +17 -0
  37. data/README.md +47 -12
  38. data/Rakefile +3 -21
  39. data/UPGRADING.md +219 -70
  40. data/docker/test/Dockerfile +32 -0
  41. data/docker/test/docker-compose.yml +0 -0
  42. data/git.gemspec +3 -4
  43. data/lib/git/author.rb +20 -1
  44. data/lib/git/branch.rb +26 -6
  45. data/lib/git/branch_delete_failure.rb +3 -0
  46. data/lib/git/branch_delete_result.rb +6 -3
  47. data/lib/git/branch_info.rb +6 -6
  48. data/lib/git/command_line/base.rb +6 -13
  49. data/lib/git/command_line/capturing.rb +67 -10
  50. data/lib/git/command_line/result.rb +0 -8
  51. data/lib/git/command_line/streaming.rb +45 -5
  52. data/lib/git/command_line.rb +4 -3
  53. data/lib/git/commands/add.rb +61 -53
  54. data/lib/git/commands/am/abort.rb +2 -2
  55. data/lib/git/commands/am/apply.rb +109 -98
  56. data/lib/git/commands/am/continue.rb +2 -2
  57. data/lib/git/commands/am/quit.rb +2 -2
  58. data/lib/git/commands/am/retry.rb +4 -2
  59. data/lib/git/commands/am/show_current_patch.rb +1 -1
  60. data/lib/git/commands/am/skip.rb +2 -2
  61. data/lib/git/commands/am.rb +2 -2
  62. data/lib/git/commands/apply.rb +7 -2
  63. data/lib/git/commands/archive/list_formats.rb +3 -3
  64. data/lib/git/commands/archive.rb +7 -2
  65. data/lib/git/commands/arguments.rb +1370 -359
  66. data/lib/git/commands/base.rb +111 -13
  67. data/lib/git/commands/branch/copy.rb +29 -21
  68. data/lib/git/commands/branch/create.rb +72 -68
  69. data/lib/git/commands/branch/delete.rb +25 -17
  70. data/lib/git/commands/branch/list.rb +76 -60
  71. data/lib/git/commands/branch/move.rb +29 -21
  72. data/lib/git/commands/branch/set_upstream.rb +8 -8
  73. data/lib/git/commands/branch/show_current.rb +3 -3
  74. data/lib/git/commands/branch/unset_upstream.rb +4 -8
  75. data/lib/git/commands/branch.rb +2 -2
  76. data/lib/git/commands/cat_file/batch.rb +36 -20
  77. data/lib/git/commands/cat_file/filtered.rb +12 -12
  78. data/lib/git/commands/cat_file/raw.rb +13 -13
  79. data/lib/git/commands/cat_file.rb +4 -4
  80. data/lib/git/commands/checkout/branch.rb +7 -5
  81. data/lib/git/commands/checkout/files.rb +5 -4
  82. data/lib/git/commands/checkout.rb +4 -4
  83. data/lib/git/commands/checkout_index.rb +5 -4
  84. data/lib/git/commands/clean.rb +6 -4
  85. data/lib/git/commands/clone.rb +5 -4
  86. data/lib/git/commands/commit.rb +5 -4
  87. data/lib/git/commands/commit_tree.rb +5 -4
  88. data/lib/git/commands/config_option_syntax/add.rb +7 -4
  89. data/lib/git/commands/config_option_syntax/get.rb +9 -5
  90. data/lib/git/commands/config_option_syntax/get_all.rb +7 -4
  91. data/lib/git/commands/config_option_syntax/get_color.rb +8 -4
  92. data/lib/git/commands/config_option_syntax/get_color_bool.rb +7 -4
  93. data/lib/git/commands/config_option_syntax/get_regexp.rb +8 -4
  94. data/lib/git/commands/config_option_syntax/get_urlmatch.rb +8 -4
  95. data/lib/git/commands/config_option_syntax/list.rb +8 -4
  96. data/lib/git/commands/config_option_syntax/remove_section.rb +7 -2
  97. data/lib/git/commands/config_option_syntax/rename_section.rb +7 -2
  98. data/lib/git/commands/config_option_syntax/replace_all.rb +7 -2
  99. data/lib/git/commands/config_option_syntax/set.rb +7 -2
  100. data/lib/git/commands/config_option_syntax/unset.rb +7 -4
  101. data/lib/git/commands/config_option_syntax/unset_all.rb +7 -2
  102. data/lib/git/commands/describe.rb +5 -4
  103. data/lib/git/commands/diff.rb +13 -12
  104. data/lib/git/commands/diff_files.rb +7 -6
  105. data/lib/git/commands/diff_index.rb +10 -7
  106. data/lib/git/commands/fetch.rb +6 -4
  107. data/lib/git/commands/fsck.rb +6 -4
  108. data/lib/git/commands/gc.rb +6 -4
  109. data/lib/git/commands/grep.rb +6 -5
  110. data/lib/git/commands/init.rb +6 -4
  111. data/lib/git/commands/log.rb +287 -285
  112. data/lib/git/commands/ls_files.rb +69 -65
  113. data/lib/git/commands/ls_remote.rb +62 -56
  114. data/lib/git/commands/ls_tree.rb +50 -46
  115. data/lib/git/commands/maintenance/register.rb +25 -23
  116. data/lib/git/commands/maintenance/run.rb +7 -2
  117. data/lib/git/commands/maintenance/start.rb +7 -2
  118. data/lib/git/commands/maintenance/stop.rb +7 -2
  119. data/lib/git/commands/maintenance/unregister.rb +7 -2
  120. data/lib/git/commands/merge/abort.rb +2 -2
  121. data/lib/git/commands/merge/continue.rb +2 -2
  122. data/lib/git/commands/merge/quit.rb +2 -2
  123. data/lib/git/commands/merge/start.rb +7 -2
  124. data/lib/git/commands/merge.rb +2 -2
  125. data/lib/git/commands/merge_base.rb +7 -2
  126. data/lib/git/commands/mv.rb +7 -2
  127. data/lib/git/commands/name_rev.rb +7 -2
  128. data/lib/git/commands/pull.rb +7 -2
  129. data/lib/git/commands/push.rb +7 -2
  130. data/lib/git/commands/read_tree.rb +7 -2
  131. data/lib/git/commands/remote/add.rb +7 -2
  132. data/lib/git/commands/remote/get_url.rb +4 -2
  133. data/lib/git/commands/remote/list.rb +4 -2
  134. data/lib/git/commands/remote/prune.rb +4 -2
  135. data/lib/git/commands/remote/remove.rb +4 -2
  136. data/lib/git/commands/remote/rename.rb +4 -2
  137. data/lib/git/commands/remote/set_branches.rb +9 -2
  138. data/lib/git/commands/remote/set_head.rb +12 -5
  139. data/lib/git/commands/remote/set_url.rb +9 -2
  140. data/lib/git/commands/remote/set_url_add.rb +11 -2
  141. data/lib/git/commands/remote/set_url_delete.rb +9 -2
  142. data/lib/git/commands/remote/show.rb +18 -12
  143. data/lib/git/commands/remote/update.rb +19 -12
  144. data/lib/git/commands/remote.rb +2 -2
  145. data/lib/git/commands/repack.rb +67 -63
  146. data/lib/git/commands/reset.rb +51 -44
  147. data/lib/git/commands/rev_parse.rb +135 -128
  148. data/lib/git/commands/revert/abort.rb +2 -2
  149. data/lib/git/commands/revert/continue.rb +7 -2
  150. data/lib/git/commands/revert/quit.rb +2 -2
  151. data/lib/git/commands/revert/skip.rb +2 -2
  152. data/lib/git/commands/revert/start.rb +7 -2
  153. data/lib/git/commands/revert.rb +2 -2
  154. data/lib/git/commands/rm.rb +35 -36
  155. data/lib/git/commands/show.rb +1 -1
  156. data/lib/git/commands/show_ref/exclude_existing.rb +3 -4
  157. data/lib/git/commands/show_ref/exists.rb +15 -13
  158. data/lib/git/commands/show_ref/list.rb +39 -35
  159. data/lib/git/commands/show_ref/verify.rb +29 -27
  160. data/lib/git/commands/show_ref.rb +4 -4
  161. data/lib/git/commands/stash/apply.rb +31 -25
  162. data/lib/git/commands/stash/branch.rb +10 -8
  163. data/lib/git/commands/stash/clear.rb +7 -5
  164. data/lib/git/commands/stash/create.rb +10 -8
  165. data/lib/git/commands/stash/drop.rb +15 -9
  166. data/lib/git/commands/stash/list.rb +9 -5
  167. data/lib/git/commands/stash/pop.rb +21 -12
  168. data/lib/git/commands/stash/push.rb +20 -11
  169. data/lib/git/commands/stash/show.rb +21 -12
  170. data/lib/git/commands/stash/store.rb +19 -10
  171. data/lib/git/commands/stash.rb +2 -2
  172. data/lib/git/commands/status.rb +7 -2
  173. data/lib/git/commands/symbolic_ref/delete.rb +18 -14
  174. data/lib/git/commands/symbolic_ref/read.rb +24 -20
  175. data/lib/git/commands/symbolic_ref/update.rb +20 -17
  176. data/lib/git/commands/symbolic_ref.rb +4 -4
  177. data/lib/git/commands/tag/create.rb +45 -42
  178. data/lib/git/commands/tag/delete.rb +5 -3
  179. data/lib/git/commands/tag/list.rb +47 -44
  180. data/lib/git/commands/tag/verify.rb +12 -12
  181. data/lib/git/commands/tag.rb +2 -2
  182. data/lib/git/commands/update_ref/batch.rb +6 -1
  183. data/lib/git/commands/update_ref/delete.rb +19 -21
  184. data/lib/git/commands/update_ref/update.rb +22 -25
  185. data/lib/git/commands/update_ref.rb +4 -4
  186. data/lib/git/commands/version.rb +14 -11
  187. data/lib/git/commands/worktree/add.rb +50 -51
  188. data/lib/git/commands/worktree/list.rb +17 -17
  189. data/lib/git/commands/worktree/lock.rb +12 -12
  190. data/lib/git/commands/worktree/move.rb +16 -16
  191. data/lib/git/commands/worktree/prune.rb +2 -2
  192. data/lib/git/commands/worktree/remove.rb +2 -2
  193. data/lib/git/commands/worktree/repair.rb +2 -2
  194. data/lib/git/commands/worktree/unlock.rb +2 -2
  195. data/lib/git/commands/write_tree.rb +2 -2
  196. data/lib/git/commands.rb +4 -3
  197. data/lib/git/config.rb +47 -1
  198. data/lib/git/configuring.rb +89 -15
  199. data/lib/git/detached_head_info.rb +4 -1
  200. data/lib/git/diff.rb +2 -5
  201. data/lib/git/diff_file_numstat_info.rb +3 -1
  202. data/lib/git/diff_file_patch_info.rb +3 -1
  203. data/lib/git/diff_file_raw_info.rb +3 -1
  204. data/lib/git/diff_info.rb +8 -15
  205. data/lib/git/diff_path_status.rb +16 -3
  206. data/lib/git/diff_result.rb +3 -1
  207. data/lib/git/diff_stats.rb +15 -0
  208. data/lib/git/dirstat_info.rb +24 -8
  209. data/lib/git/encoding_utils.rb +32 -1
  210. data/lib/git/errors.rb +19 -9
  211. data/lib/git/escaped_path.rb +55 -3
  212. data/lib/git/execution_context/repository.rb +15 -0
  213. data/lib/git/execution_context.rb +76 -74
  214. data/lib/git/file_ref.rb +6 -3
  215. data/lib/git/fsck_object.rb +8 -0
  216. data/lib/git/fsck_result.rb +26 -15
  217. data/lib/git/log.rb +152 -5
  218. data/lib/git/object.rb +284 -8
  219. data/lib/git/parsers/branch.rb +18 -0
  220. data/lib/git/parsers/cat_file.rb +2 -2
  221. data/lib/git/parsers/diff.rb +213 -5
  222. data/lib/git/parsers/fsck.rb +11 -0
  223. data/lib/git/parsers/ls_remote.rb +1 -1
  224. data/lib/git/parsers/stash.rb +51 -0
  225. data/lib/git/parsers/tag.rb +38 -0
  226. data/lib/git/remote.rb +34 -2
  227. data/lib/git/repository/branching.rb +23 -21
  228. data/lib/git/repository/committing.rb +46 -6
  229. data/lib/git/repository/context_helpers.rb +45 -16
  230. data/lib/git/repository/diffing.rb +32 -23
  231. data/lib/git/repository/factories.rb +153 -28
  232. data/lib/git/repository/inspecting.rb +1 -1
  233. data/lib/git/repository/logging.rb +169 -30
  234. data/lib/git/repository/maintenance.rb +1 -1
  235. data/lib/git/repository/merging.rb +3 -3
  236. data/lib/git/repository/object_operations.rb +108 -14
  237. data/lib/git/repository/remote_operations.rb +150 -171
  238. data/lib/git/repository/shared_private.rb +7 -5
  239. data/lib/git/repository/staging.rb +36 -12
  240. data/lib/git/repository/stashing.rb +16 -16
  241. data/lib/git/repository/status_operations.rb +1 -1
  242. data/lib/git/repository/worktree_operations.rb +1 -1
  243. data/lib/git/repository.rb +123 -63
  244. data/lib/git/stash.rb +16 -21
  245. data/lib/git/stash_info.rb +4 -4
  246. data/lib/git/stashes.rb +20 -26
  247. data/lib/git/status.rb +21 -7
  248. data/lib/git/tag_delete_failure.rb +3 -0
  249. data/lib/git/tag_delete_result.rb +6 -3
  250. data/lib/git/tag_info.rb +1 -0
  251. data/lib/git/url.rb +12 -5
  252. data/lib/git/version.rb +6 -4
  253. data/lib/git/version_constraint.rb +4 -0
  254. data/lib/git.rb +398 -314
  255. data/redesign/3_architecture_implementation.md +59 -29
  256. data/redesign/Phase 4 - Step B.md +921 -0
  257. data/redesign/Phase 4 - Step C.md +833 -0
  258. data/redesign/c1a-public-api-scope.tsv +256 -0
  259. data/redesign/phase-4-step-b-test-audit.tsv +485 -0
  260. data/tasks/yard.rake +24 -17
  261. metadata +24 -57
  262. data/commitlint.test +0 -4
  263. data/lib/git/args_builder.rb +0 -103
  264. data/lib/git/command_line_result.rb +0 -8
  265. data/lib/git/deprecation.rb +0 -9
  266. data/tasks/test.rake +0 -25
  267. /data/.github/{skills → skills-deprecated}/extract-facade-from-base-lib/KEYWORD_ARG_REMEDIATION.md +0 -0
  268. /data/.github/{skills → skills-deprecated}/review-backward-compatibility/SKILL.md +0 -0
@@ -21,12 +21,12 @@ module Git
21
21
  # For queries across multiple objects, use {CatFile::Batch}.
22
22
  # For filter-processed content, use {CatFile::Filtered}.
23
23
  #
24
+ # @note `arguments` block audited against https://git-scm.com/docs/git-cat-file/2.53.0
25
+ #
24
26
  # @see Git::Commands::CatFile
25
27
  #
26
28
  # @see https://git-scm.com/docs/git-cat-file git-cat-file documentation
27
29
  #
28
- # @note `arguments` block audited against https://git-scm.com/docs/git-cat-file/2.53.0
29
- #
30
30
  # @api private
31
31
  #
32
32
  class Raw < Base
@@ -34,28 +34,28 @@ module Git
34
34
  literal 'cat-file'
35
35
 
36
36
  # Exit 0 if object exists and is valid; exit 1 otherwise (no output)
37
- # @see https://git-scm.com/docs/git-cat-file#Documentation/git-cat-file.txt--e
37
+ # See https://git-scm.com/docs/git-cat-file#Documentation/git-cat-file.txt--e
38
38
  flag_option :e
39
39
 
40
40
  # Pretty-print the object content based on its type
41
- # @see https://git-scm.com/docs/git-cat-file#Documentation/git-cat-file.txt--p
41
+ # See https://git-scm.com/docs/git-cat-file#Documentation/git-cat-file.txt--p
42
42
  flag_option :p
43
43
 
44
44
  # Print the object type (`blob`, `tree`, `commit`, or `tag`)
45
- # @see https://git-scm.com/docs/git-cat-file#Documentation/git-cat-file.txt--t
45
+ # See https://git-scm.com/docs/git-cat-file#Documentation/git-cat-file.txt--t
46
46
  flag_option :t
47
47
 
48
48
  # Print the object size in bytes
49
- # @see https://git-scm.com/docs/git-cat-file#Documentation/git-cat-file.txt--s
49
+ # See https://git-scm.com/docs/git-cat-file#Documentation/git-cat-file.txt--s
50
50
  flag_option :s
51
51
 
52
52
  # Allow -t and -s to query broken or corrupt objects of unknown type;
53
53
  # rejected by git in any other mode — enforced by constraint below
54
- # @see https://git-scm.com/docs/git-cat-file#Documentation/git-cat-file.txt---allow-unknown-type
54
+ # See https://git-scm.com/docs/git-cat-file#Documentation/git-cat-file.txt---allow-unknown-type
55
55
  flag_option :allow_unknown_type
56
56
 
57
57
  # Map committer/author identities through the mailmap before reporting size
58
- # @see https://git-scm.com/docs/git-cat-file#Documentation/git-cat-file.txt---use-mailmap
58
+ # See https://git-scm.com/docs/git-cat-file#Documentation/git-cat-file.txt---use-mailmap
59
59
  flag_option :use_mailmap, negatable: true
60
60
 
61
61
  # Stream stdout to this IO object instead of buffering in memory.
@@ -96,7 +96,7 @@ module Git
96
96
  #
97
97
  # @option options [Boolean, nil] :no_use_mailmap (nil) suppress mailmap remapping (`--no-use-mailmap`)
98
98
  #
99
- # @return [Git::CommandLineResult] the result of calling `git cat-file`
99
+ # @return [Git::CommandLine::Result] the result of calling `git cat-file`
100
100
  #
101
101
  # Exit status 0 means the object exists; exit status 1 means it does not
102
102
  #
@@ -120,7 +120,7 @@ module Git
120
120
  #
121
121
  # @option options [Boolean, nil] :no_use_mailmap (nil) suppress mailmap remapping (`--no-use-mailmap`)
122
122
  #
123
- # @return [Git::CommandLineResult] the result of calling `git cat-file`
123
+ # @return [Git::CommandLine::Result] the result of calling `git cat-file`
124
124
  #
125
125
  # Stdout contains the object type string
126
126
  #
@@ -144,7 +144,7 @@ module Git
144
144
  #
145
145
  # @option options [Boolean, nil] :no_use_mailmap (nil) suppress mailmap remapping (`--no-use-mailmap`)
146
146
  #
147
- # @return [Git::CommandLineResult] the result of calling `git cat-file`
147
+ # @return [Git::CommandLine::Result] the result of calling `git cat-file`
148
148
  #
149
149
  # Stdout contains the object size as a decimal string
150
150
  #
@@ -165,7 +165,7 @@ module Git
165
165
  #
166
166
  # @option options [Boolean, nil] :no_use_mailmap (nil) suppress mailmap remapping (`--no-use-mailmap`)
167
167
  #
168
- # @return [Git::CommandLineResult] the result of calling `git cat-file`
168
+ # @return [Git::CommandLine::Result] the result of calling `git cat-file`
169
169
  #
170
170
  # Stdout contains the formatted object content
171
171
  #
@@ -186,7 +186,7 @@ module Git
186
186
  #
187
187
  # @option options [Boolean, nil] :no_use_mailmap (nil) suppress mailmap remapping (`--no-use-mailmap`)
188
188
  #
189
- # @return [Git::CommandLineResult] the result of calling `git cat-file`
189
+ # @return [Git::CommandLine::Result] the result of calling `git cat-file`
190
190
  #
191
191
  # Stdout contains the raw object content
192
192
  #
@@ -17,10 +17,6 @@ module Git
17
17
  # - {CatFile::Batch} — objects fed via stdin; all batch streaming modes
18
18
  # (`--batch`, `--batch-check`, `--batch-command`)
19
19
  #
20
- # @api private
21
- #
22
- # @see https://git-scm.com/docs/git-cat-file git-cat-file documentation
23
- #
24
20
  # @example Check whether an object exists
25
21
  # cmd = Git::Commands::CatFile::Raw.new(lib)
26
22
  # result = cmd.call('HEAD', e: true)
@@ -43,6 +39,10 @@ module Git
43
39
  # result.stdout
44
40
  # # => "abc1234... commit 250\nabc5678... tag 143\n"
45
41
  #
42
+ # @see https://git-scm.com/docs/git-cat-file git-cat-file documentation
43
+ #
44
+ # @api private
45
+ #
46
46
  module CatFile
47
47
  end
48
48
  end
@@ -53,9 +53,7 @@ module Git
53
53
  operand :branch
54
54
  end
55
55
 
56
- # @!method call(*, **)
57
- #
58
- # @overload call(branch = nil, **options)
56
+ # @overload call(branch = nil, **options)
59
57
  #
60
58
  # Execute the git checkout command for branch switching
61
59
  #
@@ -138,13 +136,17 @@ module Git
138
136
  # @option options [String] :chdir (nil) change to this directory before
139
137
  # running git; not passed to the git CLI
140
138
  #
141
- # @return [Git::CommandLineResult] the result of calling `git checkout`
139
+ # @return [Git::CommandLine::Result] the result of calling `git checkout`
142
140
  #
143
141
  # @raise [ArgumentError] if unsupported options are provided
144
142
  #
145
143
  # @raise [Git::FailedError] if git exits with a non-zero exit status
146
144
  #
147
- # @api public
145
+ # @api public
146
+ #
147
+ def call(*, **)
148
+ super
149
+ end
148
150
  end
149
151
  end
150
152
  end
@@ -47,9 +47,7 @@ module Git
47
47
  value_option :pathspec, as_operand: true, repeatable: true
48
48
  end
49
49
 
50
- # @!method call(*, **)
51
- #
52
- # @overload call(tree_ish = nil, **options)
50
+ # @overload call(tree_ish = nil, **options)
53
51
  #
54
52
  # Execute the git checkout command for restoring files
55
53
  #
@@ -101,7 +99,7 @@ module Git
101
99
  # @option options [String] :chdir (nil) change to this directory before
102
100
  # running git; not passed to the git CLI
103
101
  #
104
- # @return [Git::CommandLineResult] the result of calling `git checkout`
102
+ # @return [Git::CommandLine::Result] the result of calling `git checkout`
105
103
  #
106
104
  # @raise [ArgumentError] if unsupported options are provided
107
105
  #
@@ -109,6 +107,9 @@ module Git
109
107
  #
110
108
  # @api public
111
109
  #
110
+ def call(*, **)
111
+ super
112
+ end
112
113
  end
113
114
  end
114
115
  end
@@ -12,10 +12,6 @@ module Git
12
12
  # - {Checkout::Branch} — switch branches or create and switch to a new branch
13
13
  # - {Checkout::Files} — restore working tree files from a given tree-ish
14
14
  #
15
- # @api private
16
- #
17
- # @see https://git-scm.com/docs/git-checkout git-checkout documentation
18
- #
19
15
  # @example Switch to an existing branch
20
16
  # cmd = Git::Commands::Checkout::Branch.new(lib)
21
17
  # cmd.call('main')
@@ -32,6 +28,10 @@ module Git
32
28
  # cmd = Git::Commands::Checkout::Files.new(lib)
33
29
  # cmd.call('main', pathspec: ['lib/my_file.rb'])
34
30
  #
31
+ # @see https://git-scm.com/docs/git-checkout git-checkout documentation
32
+ #
33
+ # @api private
34
+ #
35
35
  module Checkout
36
36
  end
37
37
  end
@@ -42,9 +42,7 @@ module Git
42
42
  operand :file, required: false, repeatable: true
43
43
  end
44
44
 
45
- # @!method call(*, **)
46
- #
47
- # @overload call(*file, **options)
45
+ # @overload call(*file, **options)
48
46
  #
49
47
  # Execute the `git checkout-index` command
50
48
  #
@@ -92,7 +90,7 @@ module Git
92
90
  # @option options [Boolean, nil] :ignore_skip_worktree_bits (nil) check out
93
91
  # all files, including those with the skip-worktree bit set
94
92
  #
95
- # @return [Git::CommandLineResult] the result of calling `git checkout-index`
93
+ # @return [Git::CommandLine::Result] the result of calling `git checkout-index`
96
94
  #
97
95
  # @raise [ArgumentError] if unsupported options are provided
98
96
  #
@@ -100,6 +98,9 @@ module Git
100
98
  #
101
99
  # @api public
102
100
  #
101
+ def call(*, **)
102
+ super
103
+ end
103
104
  end
104
105
  end
105
106
  end
@@ -43,9 +43,7 @@ module Git
43
43
  value_option :pathspec, as_operand: true, repeatable: true
44
44
  end
45
45
 
46
- # @!method call(*, **)
47
- #
48
- # @overload call(**options)
46
+ # @overload call(**options)
49
47
  #
50
48
  # Execute the git clean command
51
49
  #
@@ -88,13 +86,17 @@ module Git
88
86
  # @option options [String, nil] :chdir (nil) change to this directory before
89
87
  # running git; not passed to the git CLI
90
88
  #
91
- # @return [Git::CommandLineResult] the result of calling `git clean`
89
+ # @return [Git::CommandLine::Result] the result of calling `git clean`
92
90
  #
93
91
  # @raise [ArgumentError] if unsupported options are provided
94
92
  #
95
93
  # @raise [Git::FailedError] if git exits with a non-zero exit status
96
94
  #
97
95
  # @api public
96
+ #
97
+ def call(*, **)
98
+ super
99
+ end
98
100
  end
99
101
  end
100
102
  end
@@ -68,9 +68,7 @@ module Git
68
68
  execution_option :chdir
69
69
  end
70
70
 
71
- # @!method call(*, **)
72
- #
73
- # @overload call(repository, directory = nil, **options)
71
+ # @overload call(repository, directory = nil, **options)
74
72
  #
75
73
  # Execute the `git clone` command
76
74
  #
@@ -227,7 +225,7 @@ module Git
227
225
  # @option options [String, nil] :chdir (nil) the working directory in which to
228
226
  # run the git clone command
229
227
  #
230
- # @return [Git::CommandLineResult] the result of calling `git clone`
228
+ # @return [Git::CommandLine::Result] the result of calling `git clone`
231
229
  #
232
230
  # @raise [ArgumentError] if unsupported options are provided
233
231
  #
@@ -235,6 +233,9 @@ module Git
235
233
  #
236
234
  # @api public
237
235
  #
236
+ def call(*, **)
237
+ super
238
+ end
238
239
  end
239
240
  end
240
241
  end
@@ -93,9 +93,7 @@ module Git
93
93
  operand :pathspec, repeatable: true
94
94
  end
95
95
 
96
- # @!method call(*, **)
97
- #
98
- # @overload call(*pathspec, **options)
96
+ # @overload call(*pathspec, **options)
99
97
  #
100
98
  # Execute the `git commit` command.
101
99
  #
@@ -259,7 +257,7 @@ module Git
259
257
  # @option options [Boolean, nil] :pathspec_file_nul (nil) pathspec elements in
260
258
  # `:pathspec_from_file` are NUL-separated instead of newline-separated
261
259
  #
262
- # @return [Git::CommandLineResult] the result of calling `git commit`
260
+ # @return [Git::CommandLine::Result] the result of calling `git commit`
263
261
  #
264
262
  # @raise [ArgumentError] if unsupported options are provided
265
263
  #
@@ -267,6 +265,9 @@ module Git
267
265
  #
268
266
  # @api public
269
267
  #
268
+ def call(*, **)
269
+ super
270
+ end
270
271
  end
271
272
  end
272
273
  end
@@ -46,9 +46,7 @@ module Git
46
46
  operand :tree, required: true
47
47
  end
48
48
 
49
- # @!method call(*, **)
50
- #
51
- # @overload call(tree, **options)
49
+ # @overload call(tree, **options)
52
50
  #
53
51
  # Execute the `git commit-tree` command
54
52
  #
@@ -84,7 +82,7 @@ module Git
84
82
  # Use `"-"` to read from standard input. Can be given more than
85
83
  # once; each file's content becomes its own paragraph.
86
84
  #
87
- # @return [Git::CommandLineResult] the result of calling
85
+ # @return [Git::CommandLine::Result] the result of calling
88
86
  # `git commit-tree`
89
87
  #
90
88
  # @raise [ArgumentError] if unsupported options are provided
@@ -95,6 +93,9 @@ module Git
95
93
  # status
96
94
  #
97
95
  # @api public
96
+ def call(*, **)
97
+ super
98
+ end
98
99
  end
99
100
  end
100
101
  end
@@ -44,9 +44,7 @@ module Git
44
44
  operand :value, required: true
45
45
  end
46
46
 
47
- # @!method call(*, **)
48
- #
49
- # @overload call(name, value, **options)
47
+ # @overload call(name, value, **options)
50
48
  #
51
49
  # Execute the `git config --add` command
52
50
  #
@@ -72,11 +70,16 @@ module Git
72
70
  #
73
71
  # @option options [String] :type (nil) ensure the value conforms to the given type
74
72
  #
75
- # @return [Git::CommandLineResult] the result of calling `git config --add`
73
+ # @return [Git::CommandLine::Result] the result of calling `git config --add`
76
74
  #
77
75
  # @raise [ArgumentError] if unsupported options are provided
78
76
  #
79
77
  # @raise [Git::FailedError] if git exits with a non-zero exit status
78
+ #
79
+ # @api public
80
+ def call(*, **)
81
+ super
82
+ end
80
83
  end
81
84
  end
82
85
  end
@@ -63,9 +63,7 @@ module Git
63
63
  # git config --get exits 1 when the key is not found (not an error)
64
64
  allow_exit_status 0..1
65
65
 
66
- # @!method call(*, **)
67
- #
68
- # @overload call(name, value_regex = nil, **options)
66
+ # @overload call(name, value_regex = nil, **options)
69
67
  #
70
68
  # Execute the `git config --get` command
71
69
  #
@@ -106,11 +104,17 @@ module Git
106
104
  #
107
105
  # @option options [String] :default (nil) default value when the key is not found
108
106
  #
109
- # @return [Git::CommandLineResult] the result of calling `git config --get`
107
+ # @return [Git::CommandLine::Result] the result of calling `git config --get`
110
108
  #
111
109
  # @raise [ArgumentError] if unsupported options are provided
112
110
  #
113
- # @raise [Git::FailedError] if git exits outside the allowed status range (0..1)
111
+ # @raise [Git::FailedError] if git exits outside the allowed range (exit code > 1)
112
+ #
113
+ # @api public
114
+ #
115
+ def call(*, **)
116
+ super
117
+ end
114
118
  end
115
119
  end
116
120
  end
@@ -59,9 +59,7 @@ module Git
59
59
  # git config --get-all exits 1 when the key is not found (not an error)
60
60
  allow_exit_status 0..1
61
61
 
62
- # @!method call(*, **)
63
- #
64
- # @overload call(name, value_regex = nil, **options)
62
+ # @overload call(name, value_regex = nil, **options)
65
63
  #
66
64
  # Execute the `git config --get-all` command
67
65
  #
@@ -104,11 +102,16 @@ module Git
104
102
  #
105
103
  # Alias: :z
106
104
  #
107
- # @return [Git::CommandLineResult] the result of calling `git config --get-all`
105
+ # @return [Git::CommandLine::Result] the result of calling `git config --get-all`
108
106
  #
109
107
  # @raise [ArgumentError] if unsupported options are provided
110
108
  #
111
109
  # @raise [Git::FailedError] if git exits outside the allowed range (exit code > 1)
110
+ #
111
+ # @api public
112
+ def call(*, **)
113
+ super
114
+ end
112
115
  end
113
116
  end
114
117
  end
@@ -48,9 +48,7 @@ module Git
48
48
  operand :default
49
49
  end
50
50
 
51
- # @!method call(*, **)
52
- #
53
- # @overload call(name, default = nil, **options)
51
+ # @overload call(name, default = nil, **options)
54
52
  #
55
53
  # Execute the `git config --get-color` command
56
54
  #
@@ -80,11 +78,17 @@ module Git
80
78
  # @option options [Boolean, nil] :no_includes (nil) suppress include directive processing
81
79
  # (`--no-includes`)
82
80
  #
83
- # @return [Git::CommandLineResult] the result of calling `git config --get-color`
81
+ # @return [Git::CommandLine::Result] the result of calling `git config --get-color`
84
82
  #
85
83
  # @raise [ArgumentError] if unsupported options are provided
86
84
  #
87
85
  # @raise [Git::FailedError] if git exits with a non-zero exit status
86
+ #
87
+ # @api public
88
+ #
89
+ def call(*, **)
90
+ super
91
+ end
88
92
  end
89
93
  end
90
94
  end
@@ -52,9 +52,7 @@ module Git
52
52
  # git config --get-colorbool exits 0 for color=yes, 1 for color=no
53
53
  allow_exit_status 0..1
54
54
 
55
- # @!method call(*, **)
56
- #
57
- # @overload call(name, stdout_is_tty = nil, **options)
55
+ # @overload call(name, stdout_is_tty = nil, **options)
58
56
  #
59
57
  # Execute the `git config --get-colorbool` command
60
58
  #
@@ -82,11 +80,16 @@ module Git
82
80
  #
83
81
  # @option options [Boolean, nil] :no_includes (nil) disable include directive processing (`--no-includes`)
84
82
  #
85
- # @return [Git::CommandLineResult] the result of calling `git config --get-colorbool`
83
+ # @return [Git::CommandLine::Result] the result of calling `git config --get-colorbool`
86
84
  #
87
85
  # @raise [ArgumentError] if unsupported options are provided
88
86
  #
89
87
  # @raise [Git::FailedError] if git exits outside the allowed range (exit code > 1)
88
+ #
89
+ # @api public
90
+ def call(*, **)
91
+ super
92
+ end
90
93
  end
91
94
  end
92
95
  end
@@ -60,9 +60,7 @@ module Git
60
60
  # git config --get-regexp exits 1 when no match is found (not an error)
61
61
  allow_exit_status 0..1
62
62
 
63
- # @!method call(*, **)
64
- #
65
- # @overload call(name_regex, value_regex = nil, **options)
63
+ # @overload call(name_regex, value_regex = nil, **options)
66
64
  #
67
65
  # Execute the `git config --get-regexp` command
68
66
  #
@@ -104,11 +102,17 @@ module Git
104
102
  #
105
103
  # @option options [Boolean, nil] :name_only (nil) output only the names of config keys
106
104
  #
107
- # @return [Git::CommandLineResult] the result of calling `git config --get-regexp`
105
+ # @return [Git::CommandLine::Result] the result of calling `git config --get-regexp`
108
106
  #
109
107
  # @raise [ArgumentError] if unsupported options are provided
110
108
  #
111
109
  # @raise [Git::FailedError] if git exits outside the allowed range (exit code > 1)
110
+ #
111
+ # @api public
112
+ #
113
+ def call(*, **)
114
+ super
115
+ end
112
116
  end
113
117
  end
114
118
  end
@@ -57,9 +57,7 @@ module Git
57
57
  # git config --get-urlmatch exits 1 when no match is found (not an error)
58
58
  allow_exit_status 0..1
59
59
 
60
- # @!method call(*, **)
61
- #
62
- # @overload call(name, url, **options)
60
+ # @overload call(name, url, **options)
63
61
  #
64
62
  # Execute the `git config --get-urlmatch` command
65
63
  #
@@ -96,11 +94,17 @@ module Git
96
94
  #
97
95
  # @option options [Boolean, nil] :show_scope (nil) show the scope of each config entry
98
96
  #
99
- # @return [Git::CommandLineResult] the result of calling `git config --get-urlmatch`
97
+ # @return [Git::CommandLine::Result] the result of calling `git config --get-urlmatch`
100
98
  #
101
99
  # @raise [ArgumentError] if unsupported options are provided
102
100
  #
103
101
  # @raise [Git::FailedError] if git exits outside the allowed range (exit code > 1)
102
+ #
103
+ # @api public
104
+ #
105
+ def call(*, **)
106
+ super
107
+ end
104
108
  end
105
109
  end
106
110
  end
@@ -56,9 +56,7 @@ module Git
56
56
  value_option :type, inline: true
57
57
  end
58
58
 
59
- # @!method call(*, **)
60
- #
61
- # @overload call(**options)
59
+ # @overload call(**options)
62
60
  #
63
61
  # Execute the `git config --list` command
64
62
  #
@@ -96,11 +94,17 @@ module Git
96
94
  #
97
95
  # @option options [String] :type (nil) ensure values conform to the given type
98
96
  #
99
- # @return [Git::CommandLineResult] the result of calling `git config --list`
97
+ # @return [Git::CommandLine::Result] the result of calling `git config --list`
100
98
  #
101
99
  # @raise [ArgumentError] if unsupported options are provided
102
100
  #
103
101
  # @raise [Git::FailedError] if git exits with a non-zero exit status
102
+ #
103
+ # @api public
104
+ #
105
+ def call(*, **)
106
+ super
107
+ end
104
108
  end
105
109
  end
106
110
  end
@@ -39,7 +39,12 @@ module Git
39
39
  operand :name, 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] :global (nil) command option key; see
47
+ # overload docs for the full option list
43
48
  #
44
49
  # @overload call(name, **options)
45
50
  #
@@ -63,7 +68,7 @@ module Git
63
68
  #
64
69
  # @option options [String] :blob (nil) read from the specified blob
65
70
  #
66
- # @return [Git::CommandLineResult] the result of calling `git config --remove-section`
71
+ # @return [Git::CommandLine::Result] the result of calling `git config --remove-section`
67
72
  #
68
73
  # @raise [ArgumentError] if unsupported options are provided
69
74
  #
@@ -41,7 +41,12 @@ module Git
41
41
  operand :new_name, 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] :global (nil) command option key; see
49
+ # overload docs for the full option list
45
50
  #
46
51
  # @overload call(old_name, new_name, **options)
47
52
  #
@@ -67,7 +72,7 @@ module Git
67
72
  #
68
73
  # @option options [String] :blob (nil) read from the specified blob
69
74
  #
70
- # @return [Git::CommandLineResult] the result of calling `git config --rename-section`
75
+ # @return [Git::CommandLine::Result] the result of calling `git config --rename-section`
71
76
  #
72
77
  # @raise [ArgumentError] if unsupported options are provided
73
78
  #
@@ -56,7 +56,12 @@ module Git
56
56
  operand :value_regex
57
57
  end
58
58
 
59
- # @!method call(*, **)
59
+ # @!method call(*, **options)
60
+ #
61
+ # @param options [Hash] command options
62
+ #
63
+ # @option options [Boolean, nil] :global (nil) command option key; see
64
+ # overload docs for the full option list
60
65
  #
61
66
  # @overload call(name, value, value_regex = nil, **options)
62
67
  #
@@ -93,7 +98,7 @@ module Git
93
98
  # @option options [Boolean, nil] :no_type (nil) unset the previously set type specifier;
94
99
  # `true` emits `--no-type`
95
100
  #
96
- # @return [Git::CommandLineResult] the result of calling `git config --replace-all`
101
+ # @return [Git::CommandLine::Result] the result of calling `git config --replace-all`
97
102
  #
98
103
  # @raise [ArgumentError] if unsupported options are provided
99
104
  #