git 4.3.2 → 5.0.0.beta.1
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/.github/copilot-instructions.md +67 -2705
- data/.github/pull_request_template.md +3 -1
- data/.github/skills/breaking-change-analysis/SKILL.md +102 -0
- data/.github/skills/ci-cd-troubleshooting/SKILL.md +264 -0
- data/.github/skills/command-implementation/REFERENCE.md +993 -0
- data/.github/skills/command-implementation/SKILL.md +229 -0
- data/.github/skills/command-test-conventions/SKILL.md +660 -0
- data/.github/skills/command-yard-documentation/SKILL.md +426 -0
- data/.github/skills/dependency-management/SKILL.md +72 -0
- data/.github/skills/development-workflow/SKILL.md +506 -0
- data/.github/skills/extract-command-from-lib/SKILL.md +487 -0
- data/.github/skills/extract-facade-from-base-lib/SKILL.md +586 -0
- data/.github/skills/facade-implementation/REFERENCE.md +840 -0
- data/.github/skills/facade-implementation/SKILL.md +260 -0
- data/.github/skills/facade-test-conventions/SKILL.md +380 -0
- data/.github/skills/facade-yard-documentation/SKILL.md +429 -0
- data/.github/skills/make-skill-template/SKILL.md +176 -0
- data/.github/skills/pr-readiness-review/SKILL.md +185 -0
- data/.github/skills/project-context/SKILL.md +313 -0
- data/.github/skills/pull-request-review/SKILL.md +168 -0
- data/.github/skills/refactor-command-to-commandlineresult/SKILL.md +131 -0
- data/.github/skills/release-management/SKILL.md +125 -0
- data/.github/skills/review-arguments-dsl/CHECKLIST.md +788 -0
- data/.github/skills/review-arguments-dsl/SKILL.md +214 -0
- data/.github/skills/review-backward-compatibility/SKILL.md +275 -0
- data/.github/skills/review-cross-command-consistency/SKILL.md +139 -0
- data/.github/skills/reviewing-skills/SKILL.md +189 -0
- data/.github/skills/rspec-unit-testing-standards/SKILL.md +639 -0
- data/.github/skills/tdd-refactor-step/SKILL.md +236 -0
- data/.github/skills/test-debugging/SKILL.md +160 -0
- data/.github/skills/yard-documentation/SKILL.md +793 -0
- data/.github/workflows/continuous_integration.yml +3 -2
- data/.github/workflows/enforce_conventional_commits.yml +1 -1
- data/.github/workflows/experimental_continuous_integration.yml +2 -2
- data/.github/workflows/release.yml +3 -4
- data/.gitignore +8 -0
- data/.husky/pre-commit +13 -0
- data/.release-please-manifest.json +1 -1
- data/.rspec +3 -0
- data/.rubocop.yml +7 -3
- data/.rubocop_todo.yml +23 -5
- data/.yardopts +1 -0
- data/CHANGELOG.md +0 -40
- data/CONTRIBUTING.md +694 -53
- data/README.md +17 -5
- data/Rakefile +61 -9
- data/commitlint.test +4 -0
- data/git.gemspec +14 -8
- data/lib/git/args_builder.rb +0 -8
- data/lib/git/base.rb +486 -410
- data/lib/git/branch.rb +380 -43
- data/lib/git/branch_delete_failure.rb +31 -0
- data/lib/git/branch_delete_result.rb +63 -0
- data/lib/git/branch_info.rb +178 -0
- data/lib/git/branches.rb +130 -24
- data/lib/git/command_line/base.rb +245 -0
- data/lib/git/command_line/capturing.rb +249 -0
- data/lib/git/command_line/result.rb +96 -0
- data/lib/git/command_line/streaming.rb +194 -0
- data/lib/git/command_line.rb +43 -322
- data/lib/git/command_line_result.rb +4 -88
- data/lib/git/commands/add.rb +131 -0
- data/lib/git/commands/am/abort.rb +43 -0
- data/lib/git/commands/am/apply.rb +252 -0
- data/lib/git/commands/am/continue.rb +43 -0
- data/lib/git/commands/am/quit.rb +43 -0
- data/lib/git/commands/am/retry.rb +47 -0
- data/lib/git/commands/am/show_current_patch.rb +64 -0
- data/lib/git/commands/am/skip.rb +42 -0
- data/lib/git/commands/am.rb +33 -0
- data/lib/git/commands/apply.rb +237 -0
- data/lib/git/commands/archive/list_formats.rb +46 -0
- data/lib/git/commands/archive.rb +140 -0
- data/lib/git/commands/arguments.rb +3510 -0
- data/lib/git/commands/base.rb +403 -0
- data/lib/git/commands/branch/copy.rb +94 -0
- data/lib/git/commands/branch/create.rb +173 -0
- data/lib/git/commands/branch/delete.rb +80 -0
- data/lib/git/commands/branch/list.rb +162 -0
- data/lib/git/commands/branch/move.rb +94 -0
- data/lib/git/commands/branch/set_upstream.rb +86 -0
- data/lib/git/commands/branch/show_current.rb +49 -0
- data/lib/git/commands/branch/unset_upstream.rb +57 -0
- data/lib/git/commands/branch.rb +34 -0
- data/lib/git/commands/cat_file/batch.rb +364 -0
- data/lib/git/commands/cat_file/filtered.rb +105 -0
- data/lib/git/commands/cat_file/raw.rb +210 -0
- data/lib/git/commands/cat_file.rb +49 -0
- data/lib/git/commands/checkout/branch.rb +151 -0
- data/lib/git/commands/checkout/files.rb +115 -0
- data/lib/git/commands/checkout.rb +38 -0
- data/lib/git/commands/checkout_index.rb +105 -0
- data/lib/git/commands/clean.rb +100 -0
- data/lib/git/commands/clone.rb +240 -0
- data/lib/git/commands/commit.rb +272 -0
- data/lib/git/commands/commit_tree.rb +100 -0
- data/lib/git/commands/config_option_syntax/add.rb +83 -0
- data/lib/git/commands/config_option_syntax/get.rb +117 -0
- data/lib/git/commands/config_option_syntax/get_all.rb +115 -0
- data/lib/git/commands/config_option_syntax/get_color.rb +91 -0
- data/lib/git/commands/config_option_syntax/get_color_bool.rb +93 -0
- data/lib/git/commands/config_option_syntax/get_regexp.rb +115 -0
- data/lib/git/commands/config_option_syntax/get_urlmatch.rb +102 -0
- data/lib/git/commands/config_option_syntax/list.rb +107 -0
- data/lib/git/commands/config_option_syntax/remove_section.rb +74 -0
- data/lib/git/commands/config_option_syntax/rename_section.rb +78 -0
- data/lib/git/commands/config_option_syntax/replace_all.rb +104 -0
- data/lib/git/commands/config_option_syntax/set.rb +114 -0
- data/lib/git/commands/config_option_syntax/unset.rb +89 -0
- data/lib/git/commands/config_option_syntax/unset_all.rb +89 -0
- data/lib/git/commands/config_option_syntax.rb +56 -0
- data/lib/git/commands/describe.rb +155 -0
- data/lib/git/commands/diff.rb +656 -0
- data/lib/git/commands/diff_files.rb +518 -0
- data/lib/git/commands/diff_index.rb +496 -0
- data/lib/git/commands/fetch.rb +352 -0
- data/lib/git/commands/fsck.rb +136 -0
- data/lib/git/commands/gc.rb +132 -0
- data/lib/git/commands/grep.rb +338 -0
- data/lib/git/commands/init.rb +99 -0
- data/lib/git/commands/log.rb +632 -0
- data/lib/git/commands/ls_files.rb +191 -0
- data/lib/git/commands/ls_remote.rb +155 -0
- data/lib/git/commands/ls_tree.rb +131 -0
- data/lib/git/commands/maintenance/register.rb +75 -0
- data/lib/git/commands/maintenance/run.rb +104 -0
- data/lib/git/commands/maintenance/start.rb +66 -0
- data/lib/git/commands/maintenance/stop.rb +55 -0
- data/lib/git/commands/maintenance/unregister.rb +79 -0
- data/lib/git/commands/maintenance.rb +31 -0
- data/lib/git/commands/merge/abort.rb +44 -0
- data/lib/git/commands/merge/continue.rb +44 -0
- data/lib/git/commands/merge/quit.rb +46 -0
- data/lib/git/commands/merge/start.rb +245 -0
- data/lib/git/commands/merge.rb +28 -0
- data/lib/git/commands/merge_base.rb +86 -0
- data/lib/git/commands/mv.rb +77 -0
- data/lib/git/commands/name_rev.rb +114 -0
- data/lib/git/commands/pull.rb +377 -0
- data/lib/git/commands/push.rb +246 -0
- data/lib/git/commands/read_tree.rb +149 -0
- data/lib/git/commands/remote/add.rb +91 -0
- data/lib/git/commands/remote/get_url.rb +66 -0
- data/lib/git/commands/remote/list.rb +54 -0
- data/lib/git/commands/remote/prune.rb +61 -0
- data/lib/git/commands/remote/remove.rb +52 -0
- data/lib/git/commands/remote/rename.rb +69 -0
- data/lib/git/commands/remote/set_branches.rb +63 -0
- data/lib/git/commands/remote/set_head.rb +82 -0
- data/lib/git/commands/remote/set_url.rb +71 -0
- data/lib/git/commands/remote/set_url_add.rb +61 -0
- data/lib/git/commands/remote/set_url_delete.rb +64 -0
- data/lib/git/commands/remote/show.rb +71 -0
- data/lib/git/commands/remote/update.rb +72 -0
- data/lib/git/commands/remote.rb +42 -0
- data/lib/git/commands/repack.rb +277 -0
- data/lib/git/commands/reset.rb +147 -0
- data/lib/git/commands/rev_parse.rb +297 -0
- data/lib/git/commands/revert/abort.rb +45 -0
- data/lib/git/commands/revert/continue.rb +57 -0
- data/lib/git/commands/revert/quit.rb +47 -0
- data/lib/git/commands/revert/skip.rb +44 -0
- data/lib/git/commands/revert/start.rb +153 -0
- data/lib/git/commands/revert.rb +29 -0
- data/lib/git/commands/rm.rb +114 -0
- data/lib/git/commands/show.rb +632 -0
- data/lib/git/commands/show_ref/exclude_existing.rb +120 -0
- data/lib/git/commands/show_ref/exists.rb +78 -0
- data/lib/git/commands/show_ref/list.rb +145 -0
- data/lib/git/commands/show_ref/verify.rb +120 -0
- data/lib/git/commands/show_ref.rb +42 -0
- data/lib/git/commands/stash/apply.rb +75 -0
- data/lib/git/commands/stash/branch.rb +65 -0
- data/lib/git/commands/stash/clear.rb +41 -0
- data/lib/git/commands/stash/create.rb +58 -0
- data/lib/git/commands/stash/drop.rb +67 -0
- data/lib/git/commands/stash/list.rb +39 -0
- data/lib/git/commands/stash/pop.rb +78 -0
- data/lib/git/commands/stash/push.rb +103 -0
- data/lib/git/commands/stash/show.rb +149 -0
- data/lib/git/commands/stash/store.rb +63 -0
- data/lib/git/commands/stash.rb +38 -0
- data/lib/git/commands/status.rb +169 -0
- data/lib/git/commands/symbolic_ref/delete.rb +68 -0
- data/lib/git/commands/symbolic_ref/read.rb +95 -0
- data/lib/git/commands/symbolic_ref/update.rb +76 -0
- data/lib/git/commands/symbolic_ref.rb +38 -0
- data/lib/git/commands/tag/create.rb +139 -0
- data/lib/git/commands/tag/delete.rb +55 -0
- data/lib/git/commands/tag/list.rb +143 -0
- data/lib/git/commands/tag/verify.rb +71 -0
- data/lib/git/commands/tag.rb +26 -0
- data/lib/git/commands/update_ref/batch.rb +140 -0
- data/lib/git/commands/update_ref/delete.rb +92 -0
- data/lib/git/commands/update_ref/update.rb +106 -0
- data/lib/git/commands/update_ref.rb +42 -0
- data/lib/git/commands/version.rb +52 -0
- data/lib/git/commands/worktree/add.rb +140 -0
- data/lib/git/commands/worktree/list.rb +64 -0
- data/lib/git/commands/worktree/lock.rb +58 -0
- data/lib/git/commands/worktree/management_base.rb +51 -0
- data/lib/git/commands/worktree/move.rb +66 -0
- data/lib/git/commands/worktree/prune.rb +67 -0
- data/lib/git/commands/worktree/remove.rb +63 -0
- data/lib/git/commands/worktree/repair.rb +76 -0
- data/lib/git/commands/worktree/unlock.rb +47 -0
- data/lib/git/commands/worktree.rb +43 -0
- data/lib/git/commands/write_tree.rb +68 -0
- data/lib/git/commands.rb +89 -0
- data/lib/git/detached_head_info.rb +54 -0
- data/lib/git/diff.rb +297 -7
- data/lib/git/diff_file_numstat_info.rb +29 -0
- data/lib/git/diff_file_patch_info.rb +134 -0
- data/lib/git/diff_file_raw_info.rb +127 -0
- data/lib/git/diff_info.rb +169 -0
- data/lib/git/diff_path_status.rb +78 -19
- data/lib/git/diff_result.rb +32 -0
- data/lib/git/diff_stats.rb +59 -14
- data/lib/git/dirstat_info.rb +86 -0
- data/lib/git/errors.rb +65 -2
- data/lib/git/execution_context/global.rb +56 -0
- data/lib/git/execution_context/repository.rb +147 -0
- data/lib/git/execution_context.rb +482 -0
- data/lib/git/file_ref.rb +74 -0
- data/lib/git/fsck_object.rb +9 -9
- data/lib/git/fsck_result.rb +1 -1
- data/lib/git/lib.rb +1606 -1028
- data/lib/git/log.rb +15 -2
- data/lib/git/object.rb +92 -22
- data/lib/git/parsers/branch.rb +224 -0
- data/lib/git/parsers/cat_file.rb +111 -0
- data/lib/git/parsers/diff.rb +585 -0
- data/lib/git/parsers/fsck.rb +133 -0
- data/lib/git/parsers/grep.rb +42 -0
- data/lib/git/parsers/ls_tree.rb +58 -0
- data/lib/git/parsers/stash.rb +208 -0
- data/lib/git/parsers/tag.rb +257 -0
- data/lib/git/remote.rb +133 -9
- data/lib/git/repository/branching.rb +572 -0
- data/lib/git/repository/committing.rb +191 -0
- data/lib/git/repository/configuring.rb +156 -0
- data/lib/git/repository/diffing.rb +775 -0
- data/lib/git/repository/inspecting.rb +153 -0
- data/lib/git/repository/logging.rb +247 -0
- data/lib/git/repository/merging.rb +295 -0
- data/lib/git/repository/object_operations.rb +1101 -0
- data/lib/git/repository/path_resolver.rb +207 -0
- data/lib/git/repository/remote_operations.rb +753 -0
- data/lib/git/repository/shared_private.rb +51 -0
- data/lib/git/repository/staging.rb +390 -0
- data/lib/git/repository/stashing.rb +107 -0
- data/lib/git/repository/status_operations.rb +180 -0
- data/lib/git/repository/worktree_operations.rb +159 -0
- data/lib/git/repository.rb +264 -1
- data/lib/git/stash.rb +85 -4
- data/lib/git/stash_info.rb +104 -0
- data/lib/git/stashes.rb +130 -13
- data/lib/git/status.rb +224 -18
- data/lib/git/tag_delete_failure.rb +31 -0
- data/lib/git/tag_delete_result.rb +63 -0
- data/lib/git/tag_info.rb +105 -0
- data/lib/git/version.rb +109 -2
- data/lib/git/version_constraint.rb +81 -0
- data/lib/git/worktree.rb +120 -5
- data/lib/git/worktrees.rb +107 -7
- data/lib/git.rb +114 -18
- data/redesign/1_architecture_existing.md +54 -18
- data/redesign/2_architecture_redesign.md +365 -46
- data/redesign/3_architecture_implementation.md +1451 -54
- data/tasks/gem_tasks.rake +4 -0
- data/tasks/npm_tasks.rake +7 -0
- data/tasks/rspec.rake +48 -0
- data/tasks/test.rake +13 -1
- data/tasks/yard.rake +34 -7
- metadata +349 -20
- data/lib/git/index.rb +0 -6
- data/lib/git/path.rb +0 -38
- data/lib/git/working_directory.rb +0 -6
- /data/{release-please-config.json → .release-please-config.json} +0 -0
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'git/commands/base'
|
|
4
|
+
|
|
5
|
+
module Git
|
|
6
|
+
module Commands
|
|
7
|
+
# Wrapper for the `git show` command
|
|
8
|
+
#
|
|
9
|
+
# Displays information about git objects (commits, annotated tags, trees,
|
|
10
|
+
# or blobs). Output format varies by object type and is intended for human
|
|
11
|
+
# consumption rather than machine parsing.
|
|
12
|
+
#
|
|
13
|
+
# @example Show the HEAD commit
|
|
14
|
+
# show = Git::Commands::Show.new(execution_context)
|
|
15
|
+
# result = show.call
|
|
16
|
+
#
|
|
17
|
+
# @example Show a specific commit
|
|
18
|
+
# show = Git::Commands::Show.new(execution_context)
|
|
19
|
+
# result = show.call('HEAD')
|
|
20
|
+
#
|
|
21
|
+
# @example Show the contents of a file at a given revision
|
|
22
|
+
# show = Git::Commands::Show.new(execution_context)
|
|
23
|
+
# result = show.call('abc123:README.md')
|
|
24
|
+
#
|
|
25
|
+
# @example Show multiple objects
|
|
26
|
+
# show = Git::Commands::Show.new(execution_context)
|
|
27
|
+
# result = show.call('v1.0', 'v2.0')
|
|
28
|
+
#
|
|
29
|
+
# @note `arguments` block audited against
|
|
30
|
+
# https://git-scm.com/docs/git-show/2.53.0
|
|
31
|
+
#
|
|
32
|
+
# @see https://git-scm.com/docs/git-show git-show documentation
|
|
33
|
+
#
|
|
34
|
+
# @see Git::Commands
|
|
35
|
+
#
|
|
36
|
+
# @api private
|
|
37
|
+
#
|
|
38
|
+
class Show < Git::Commands::Base # rubocop:disable Metrics/ClassLength
|
|
39
|
+
arguments do
|
|
40
|
+
literal 'show'
|
|
41
|
+
|
|
42
|
+
# Commit formatting
|
|
43
|
+
flag_or_value_option :pretty, inline: true
|
|
44
|
+
value_option :format, inline: true
|
|
45
|
+
flag_option :abbrev_commit, negatable: true
|
|
46
|
+
flag_option :oneline
|
|
47
|
+
value_option :encoding, inline: true
|
|
48
|
+
flag_or_value_option :expand_tabs, negatable: true, inline: true
|
|
49
|
+
flag_or_value_option :notes, negatable: true, inline: true
|
|
50
|
+
flag_option :show_notes_by_default
|
|
51
|
+
flag_or_value_option :show_notes, inline: true
|
|
52
|
+
flag_option :standard_notes, negatable: true
|
|
53
|
+
flag_option :show_signature
|
|
54
|
+
|
|
55
|
+
# Merge diff format
|
|
56
|
+
flag_option :m
|
|
57
|
+
flag_option :c
|
|
58
|
+
flag_option :cc
|
|
59
|
+
flag_option :dd
|
|
60
|
+
flag_option :remerge_diff
|
|
61
|
+
flag_option :no_diff_merges
|
|
62
|
+
value_option :diff_merges, inline: true
|
|
63
|
+
flag_option :combined_all_paths
|
|
64
|
+
|
|
65
|
+
# Output format
|
|
66
|
+
flag_option %i[patch p u]
|
|
67
|
+
flag_option %i[no_patch s]
|
|
68
|
+
value_option %i[unified U], inline: true
|
|
69
|
+
value_option :output, inline: true
|
|
70
|
+
value_option :output_indicator_new, inline: true
|
|
71
|
+
value_option :output_indicator_old, inline: true
|
|
72
|
+
value_option :output_indicator_context, inline: true
|
|
73
|
+
flag_option :raw
|
|
74
|
+
flag_option :patch_with_raw
|
|
75
|
+
flag_option :t
|
|
76
|
+
flag_option :indent_heuristic, negatable: true
|
|
77
|
+
flag_option :minimal
|
|
78
|
+
flag_option :patience
|
|
79
|
+
flag_option :histogram
|
|
80
|
+
value_option :anchored, inline: true, repeatable: true
|
|
81
|
+
value_option :diff_algorithm, inline: true
|
|
82
|
+
flag_or_value_option :stat, inline: true
|
|
83
|
+
value_option :stat_width, inline: true
|
|
84
|
+
value_option :stat_name_width, inline: true
|
|
85
|
+
value_option :stat_count, inline: true
|
|
86
|
+
value_option :stat_graph_width, inline: true
|
|
87
|
+
flag_option :compact_summary
|
|
88
|
+
flag_option :numstat
|
|
89
|
+
flag_option :shortstat
|
|
90
|
+
flag_or_value_option %i[dirstat X], inline: true
|
|
91
|
+
flag_option :cumulative
|
|
92
|
+
flag_or_value_option :dirstat_by_file, inline: true
|
|
93
|
+
flag_option :summary
|
|
94
|
+
flag_option :patch_with_stat
|
|
95
|
+
flag_option :z
|
|
96
|
+
flag_option :name_only
|
|
97
|
+
flag_option :name_status
|
|
98
|
+
flag_or_value_option :submodule, inline: true
|
|
99
|
+
|
|
100
|
+
# Color and word diff
|
|
101
|
+
flag_or_value_option :color, negatable: true, inline: true
|
|
102
|
+
flag_or_value_option :color_moved, negatable: true, inline: true
|
|
103
|
+
flag_or_value_option :color_moved_ws, negatable: true, inline: true
|
|
104
|
+
flag_or_value_option :word_diff, inline: true
|
|
105
|
+
value_option :word_diff_regex, inline: true
|
|
106
|
+
flag_or_value_option :color_words, inline: true
|
|
107
|
+
|
|
108
|
+
# Rename and copy detection
|
|
109
|
+
flag_option :no_renames
|
|
110
|
+
flag_option :rename_empty, negatable: true
|
|
111
|
+
flag_option :check
|
|
112
|
+
value_option :ws_error_highlight, inline: true
|
|
113
|
+
flag_option :full_index
|
|
114
|
+
flag_option :binary
|
|
115
|
+
flag_or_value_option :abbrev, inline: true
|
|
116
|
+
flag_or_value_option %i[break_rewrites B], inline: true
|
|
117
|
+
flag_or_value_option %i[find_renames M], inline: true
|
|
118
|
+
flag_or_value_option %i[find_copies C], inline: true
|
|
119
|
+
flag_option :find_copies_harder
|
|
120
|
+
flag_option %i[irreversible_delete D]
|
|
121
|
+
value_option :l, inline: true
|
|
122
|
+
value_option :diff_filter, inline: true
|
|
123
|
+
|
|
124
|
+
# Content search (pickaxe)
|
|
125
|
+
value_option :S, inline: true
|
|
126
|
+
value_option :G, inline: true
|
|
127
|
+
value_option :find_object, inline: true
|
|
128
|
+
flag_option :pickaxe_all
|
|
129
|
+
flag_option :pickaxe_regex
|
|
130
|
+
|
|
131
|
+
# Output ordering
|
|
132
|
+
value_option :O, inline: true
|
|
133
|
+
value_option :skip_to, inline: true
|
|
134
|
+
value_option :rotate_to, inline: true
|
|
135
|
+
flag_option :R
|
|
136
|
+
|
|
137
|
+
# Path scope
|
|
138
|
+
flag_or_value_option :relative, negatable: true, inline: true
|
|
139
|
+
flag_option %i[text a]
|
|
140
|
+
|
|
141
|
+
# Whitespace handling
|
|
142
|
+
flag_option :ignore_cr_at_eol
|
|
143
|
+
flag_option :ignore_space_at_eol
|
|
144
|
+
flag_option %i[ignore_space_change b]
|
|
145
|
+
flag_option %i[ignore_all_space w]
|
|
146
|
+
flag_option :ignore_blank_lines
|
|
147
|
+
value_option %i[ignore_matching_lines I], inline: true, repeatable: true
|
|
148
|
+
value_option :inter_hunk_context, inline: true
|
|
149
|
+
flag_option %i[function_context W]
|
|
150
|
+
|
|
151
|
+
# Behavior control
|
|
152
|
+
flag_option :ext_diff, negatable: true
|
|
153
|
+
flag_option :textconv, negatable: true
|
|
154
|
+
flag_or_value_option :ignore_submodules, inline: true
|
|
155
|
+
|
|
156
|
+
# Prefix and path display
|
|
157
|
+
value_option :src_prefix, inline: true
|
|
158
|
+
value_option :dst_prefix, inline: true
|
|
159
|
+
flag_option :no_prefix
|
|
160
|
+
flag_option :default_prefix
|
|
161
|
+
value_option :line_prefix, inline: true
|
|
162
|
+
flag_option :ita_invisible_in_index
|
|
163
|
+
flag_option :ita_visible_in_index
|
|
164
|
+
value_option :max_depth, inline: true
|
|
165
|
+
|
|
166
|
+
execution_option :out
|
|
167
|
+
|
|
168
|
+
operand :object, repeatable: true
|
|
169
|
+
|
|
170
|
+
# `end_of_options` must be called after `:object` because `git show` treats
|
|
171
|
+
# every operand before `--` as an object reference, and every operand after
|
|
172
|
+
# `--` as a pathspec
|
|
173
|
+
#
|
|
174
|
+
end_of_options
|
|
175
|
+
|
|
176
|
+
value_option :pathspec, as_operand: true, repeatable: true
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# @!method call(*, **)
|
|
180
|
+
#
|
|
181
|
+
# @overload call(*object, **options)
|
|
182
|
+
#
|
|
183
|
+
# Trailing newlines in `result.stdout` are preserved so that blob content
|
|
184
|
+
# is returned unchanged. Pass `out:` to stream output directly to an IO
|
|
185
|
+
# object instead of capturing it.
|
|
186
|
+
#
|
|
187
|
+
# @param object [Array<String>] zero or more object specifiers (refs, SHAs,
|
|
188
|
+
# `objectish:path` expressions, etc.)
|
|
189
|
+
#
|
|
190
|
+
# When empty, defaults to `HEAD`
|
|
191
|
+
#
|
|
192
|
+
# To access the contents of a specific file at a revision, use
|
|
193
|
+
# `objectish:path` notation (e.g. `HEAD:README.md`) as the object
|
|
194
|
+
# specifier. To filter entries within a tree object, pass the
|
|
195
|
+
# `:pathspec` option.
|
|
196
|
+
#
|
|
197
|
+
# @param options [Hash] command options
|
|
198
|
+
#
|
|
199
|
+
# @option options [Boolean, String, nil] :pretty (nil) pretty-print commit
|
|
200
|
+
# log messages in the given format
|
|
201
|
+
#
|
|
202
|
+
# Pass `true` for `--pretty` (defaults to `medium`); pass a string like
|
|
203
|
+
# `'oneline'` or `'format:%H %s'` for `--pretty=<format>`.
|
|
204
|
+
#
|
|
205
|
+
# @option options [String] :format (nil) format string passed as
|
|
206
|
+
# `--format=<format>` (equivalent to `--pretty=tformat:<format>`)
|
|
207
|
+
#
|
|
208
|
+
# @option options [Boolean, nil] :abbrev_commit (nil) show an abbreviated
|
|
209
|
+
# commit hash prefix (`--abbrev-commit`)
|
|
210
|
+
#
|
|
211
|
+
# @option options [Boolean, nil] :no_abbrev_commit (nil) show the full commit
|
|
212
|
+
# hash (`--no-abbrev-commit`)
|
|
213
|
+
#
|
|
214
|
+
# @option options [Boolean, nil] :oneline (nil) shorthand for
|
|
215
|
+
# `--pretty=oneline --abbrev-commit`
|
|
216
|
+
#
|
|
217
|
+
# @option options [String] :encoding (nil) re-encode the commit log
|
|
218
|
+
# message in the specified encoding
|
|
219
|
+
#
|
|
220
|
+
# @option options [Boolean, Integer, nil] :expand_tabs (nil) expand tabs in
|
|
221
|
+
# the log message before showing it
|
|
222
|
+
#
|
|
223
|
+
# Pass `true` for `--expand-tabs` (tab stop every 8 columns) or an
|
|
224
|
+
# integer for `--expand-tabs=<n>`.
|
|
225
|
+
#
|
|
226
|
+
# @option options [Boolean, nil] :no_expand_tabs (nil) disable tab expansion
|
|
227
|
+
# (`--no-expand-tabs`)
|
|
228
|
+
#
|
|
229
|
+
# @option options [Boolean, String, nil] :notes (nil) show notes that annotate
|
|
230
|
+
# the commit
|
|
231
|
+
#
|
|
232
|
+
# Pass `true` for `--notes` or a string like `'refs/notes/review'` for
|
|
233
|
+
# `--notes=<ref>`.
|
|
234
|
+
#
|
|
235
|
+
# @option options [Boolean, nil] :no_notes (nil) suppress notes output
|
|
236
|
+
# (`--no-notes`)
|
|
237
|
+
#
|
|
238
|
+
# @option options [Boolean, nil] :show_notes_by_default (nil) show the
|
|
239
|
+
# default notes unless options for displaying specific notes are given
|
|
240
|
+
#
|
|
241
|
+
# @option options [Boolean, String, nil] :show_notes (nil) deprecated; use
|
|
242
|
+
# `:notes` instead
|
|
243
|
+
#
|
|
244
|
+
# @option options [Boolean, nil] :standard_notes (nil) deprecated; use `:notes`
|
|
245
|
+
# instead (`--standard-notes`)
|
|
246
|
+
#
|
|
247
|
+
# @option options [Boolean, nil] :no_standard_notes (nil) deprecated; use
|
|
248
|
+
# `:notes` instead (`--no-standard-notes`)
|
|
249
|
+
#
|
|
250
|
+
# @option options [Boolean, nil] :show_signature (nil) check the validity
|
|
251
|
+
# of a signed commit by passing the signature to `gpg --verify`
|
|
252
|
+
#
|
|
253
|
+
# @option options [Boolean, nil] :m (nil) show diffs for merge commits in
|
|
254
|
+
# the default format (no output unless `-p` is also given)
|
|
255
|
+
#
|
|
256
|
+
# @option options [Boolean, nil] :c (nil) produce combined diff output for
|
|
257
|
+
# merge commits; shortcut for `--diff-merges=combined -p`
|
|
258
|
+
#
|
|
259
|
+
# @option options [Boolean, nil] :cc (nil) produce dense combined diff
|
|
260
|
+
# output for merge commits; shortcut for `--diff-merges=dense-combined -p`
|
|
261
|
+
#
|
|
262
|
+
# @option options [Boolean, nil] :dd (nil) produce diff with respect to
|
|
263
|
+
# first parent; shortcut for `--diff-merges=first-parent -p`
|
|
264
|
+
#
|
|
265
|
+
# @option options [Boolean, nil] :remerge_diff (nil) produce remerge-diff
|
|
266
|
+
# output for merge commits; shortcut for `--diff-merges=remerge -p`
|
|
267
|
+
#
|
|
268
|
+
# @option options [Boolean, nil] :no_diff_merges (nil) disable diff output
|
|
269
|
+
# for merge commits; synonym for `--diff-merges=off`
|
|
270
|
+
#
|
|
271
|
+
# @option options [String] :diff_merges (nil) specify the diff format for
|
|
272
|
+
# merge commits (`off`, `on`, `first-parent`, `separate`, `combined`,
|
|
273
|
+
# `dense-combined`, or `remerge`)
|
|
274
|
+
#
|
|
275
|
+
# @option options [Boolean, nil] :combined_all_paths (nil) show paths from
|
|
276
|
+
# all parents when generating a combined diff
|
|
277
|
+
#
|
|
278
|
+
# @option options [Boolean, nil] :patch (nil) generate patch output
|
|
279
|
+
#
|
|
280
|
+
# Alias: :p, :u
|
|
281
|
+
#
|
|
282
|
+
# @option options [Boolean, nil] :no_patch (nil) suppress all diff output
|
|
283
|
+
#
|
|
284
|
+
# Alias: :s
|
|
285
|
+
#
|
|
286
|
+
# @option options [Integer, String] :unified (nil) generate diffs with
|
|
287
|
+
# this many lines of context
|
|
288
|
+
#
|
|
289
|
+
# Alias: :U
|
|
290
|
+
#
|
|
291
|
+
# @option options [String] :output (nil) write output to a file instead
|
|
292
|
+
# of stdout
|
|
293
|
+
#
|
|
294
|
+
# @option options [String] :output_indicator_new (nil) character to
|
|
295
|
+
# indicate new lines in the patch
|
|
296
|
+
#
|
|
297
|
+
# @option options [String] :output_indicator_old (nil) character to
|
|
298
|
+
# indicate old lines in the patch
|
|
299
|
+
#
|
|
300
|
+
# @option options [String] :output_indicator_context (nil) character to
|
|
301
|
+
# indicate context lines in the patch
|
|
302
|
+
#
|
|
303
|
+
# @option options [Boolean, nil] :raw (nil) show a summary of changes in
|
|
304
|
+
# raw diff format
|
|
305
|
+
#
|
|
306
|
+
# @option options [Boolean, nil] :patch_with_raw (nil) synonym for
|
|
307
|
+
# `--patch --raw`
|
|
308
|
+
#
|
|
309
|
+
# @option options [Boolean, nil] :t (nil) show tree objects in the diff
|
|
310
|
+
# output
|
|
311
|
+
#
|
|
312
|
+
# @option options [Boolean, nil] :indent_heuristic (nil) use the indent
|
|
313
|
+
# heuristic to improve patch readability (`--indent-heuristic`)
|
|
314
|
+
#
|
|
315
|
+
# @option options [Boolean, nil] :no_indent_heuristic (nil) disable the indent
|
|
316
|
+
# heuristic (`--no-indent-heuristic`)
|
|
317
|
+
#
|
|
318
|
+
# @option options [Boolean, nil] :minimal (nil) spend extra time to produce
|
|
319
|
+
# the smallest possible diff
|
|
320
|
+
#
|
|
321
|
+
# @option options [Boolean, nil] :patience (nil) use the patience diff
|
|
322
|
+
# algorithm
|
|
323
|
+
#
|
|
324
|
+
# @option options [Boolean, nil] :histogram (nil) use the histogram diff
|
|
325
|
+
# algorithm
|
|
326
|
+
#
|
|
327
|
+
# @option options [String, Array<String>] :anchored (nil) generate a diff
|
|
328
|
+
# using the anchored diff algorithm
|
|
329
|
+
#
|
|
330
|
+
# Pass an array for multiple anchored texts. Maps to
|
|
331
|
+
# `--anchored=<text>`.
|
|
332
|
+
#
|
|
333
|
+
# @option options [String] :diff_algorithm (nil) choose a diff algorithm
|
|
334
|
+
# (`patience`, `minimal`, `histogram`, or `myers`)
|
|
335
|
+
#
|
|
336
|
+
# @option options [Boolean, String, nil] :stat (nil) generate a diffstat
|
|
337
|
+
#
|
|
338
|
+
# Pass `true` for `--stat`; pass a string like `'100,40,10'` for
|
|
339
|
+
# `--stat=100,40,10`.
|
|
340
|
+
#
|
|
341
|
+
# @option options [Integer, String] :stat_width (nil) limit the width of
|
|
342
|
+
# `--stat` output
|
|
343
|
+
#
|
|
344
|
+
# @option options [Integer, String] :stat_name_width (nil) limit the
|
|
345
|
+
# filename width of `--stat` output
|
|
346
|
+
#
|
|
347
|
+
# @option options [Integer, String] :stat_count (nil) limit the number of
|
|
348
|
+
# lines in `--stat` output
|
|
349
|
+
#
|
|
350
|
+
# @option options [Integer, String] :stat_graph_width (nil) limit the
|
|
351
|
+
# graph width of `--stat` output
|
|
352
|
+
#
|
|
353
|
+
# @option options [Boolean, nil] :compact_summary (nil) output a condensed
|
|
354
|
+
# summary of extended header information
|
|
355
|
+
#
|
|
356
|
+
# @option options [Boolean, nil] :numstat (nil) show per-file
|
|
357
|
+
# insertion/deletion counts in decimal notation
|
|
358
|
+
#
|
|
359
|
+
# @option options [Boolean, nil] :shortstat (nil) output only the aggregate
|
|
360
|
+
# totals line from `--stat`
|
|
361
|
+
#
|
|
362
|
+
# @option options [Boolean, String, nil] :dirstat (nil) output the distribution
|
|
363
|
+
# of relative amount of changes per sub-directory
|
|
364
|
+
#
|
|
365
|
+
# Pass `true` for `--dirstat`; pass a string like
|
|
366
|
+
# `'lines,cumulative'` for `--dirstat=lines,cumulative`.
|
|
367
|
+
#
|
|
368
|
+
# Alias: :X
|
|
369
|
+
#
|
|
370
|
+
# @option options [Boolean, nil] :cumulative (nil) synonym for
|
|
371
|
+
# `--dirstat=cumulative`
|
|
372
|
+
#
|
|
373
|
+
# @option options [Boolean, String, nil] :dirstat_by_file (nil) synonym for
|
|
374
|
+
# `--dirstat=files,...`
|
|
375
|
+
#
|
|
376
|
+
# @option options [Boolean, nil] :summary (nil) output a condensed summary
|
|
377
|
+
# of extended header information
|
|
378
|
+
#
|
|
379
|
+
# @option options [Boolean, nil] :patch_with_stat (nil) synonym for
|
|
380
|
+
# `--patch --stat`
|
|
381
|
+
#
|
|
382
|
+
# @option options [Boolean, nil] :z (nil) use NUL as output field terminators
|
|
383
|
+
#
|
|
384
|
+
# @option options [Boolean, nil] :name_only (nil) show only the name of each
|
|
385
|
+
# changed file
|
|
386
|
+
#
|
|
387
|
+
# @option options [Boolean, nil] :name_status (nil) show only the name and
|
|
388
|
+
# status of each changed file
|
|
389
|
+
#
|
|
390
|
+
# @option options [Boolean, String, nil] :submodule (nil) specify how
|
|
391
|
+
# differences in submodules are shown
|
|
392
|
+
#
|
|
393
|
+
# Pass `true` for `--submodule`; pass a string like `'log'` or `'diff'`
|
|
394
|
+
# for `--submodule=<format>`.
|
|
395
|
+
#
|
|
396
|
+
# @option options [Boolean, String, nil] :color (nil) show colored diff
|
|
397
|
+
#
|
|
398
|
+
# Pass `true` for `--color` or a string like `'always'` for
|
|
399
|
+
# `--color=always`.
|
|
400
|
+
#
|
|
401
|
+
# @option options [Boolean, nil] :no_color (nil) disable colored diff output
|
|
402
|
+
# (`--no-color`)
|
|
403
|
+
#
|
|
404
|
+
# @option options [Boolean, String, nil] :color_moved (nil) color moved lines
|
|
405
|
+
# differently
|
|
406
|
+
#
|
|
407
|
+
# Pass `true` for `--color-moved` or a string like `'zebra'` for
|
|
408
|
+
# `--color-moved=zebra`.
|
|
409
|
+
#
|
|
410
|
+
# @option options [Boolean, nil] :no_color_moved (nil) disable coloring of
|
|
411
|
+
# moved lines (`--no-color-moved`)
|
|
412
|
+
#
|
|
413
|
+
# @option options [Boolean, String, nil] :color_moved_ws (nil) configure how
|
|
414
|
+
# whitespace is handled during move detection
|
|
415
|
+
#
|
|
416
|
+
# Pass `true` for `--color-moved-ws` or a string like `'ignore-all-space'`
|
|
417
|
+
# for `--color-moved-ws=ignore-all-space`.
|
|
418
|
+
#
|
|
419
|
+
# @option options [Boolean, nil] :no_color_moved_ws (nil) disable whitespace
|
|
420
|
+
# handling during move detection (`--no-color-moved-ws`)
|
|
421
|
+
#
|
|
422
|
+
# @option options [Boolean, String, nil] :word_diff (nil) show a word diff
|
|
423
|
+
#
|
|
424
|
+
# Pass `true` for `--word-diff`; pass a string like `'color'` for
|
|
425
|
+
# `--word-diff=color`.
|
|
426
|
+
#
|
|
427
|
+
# @option options [String] :word_diff_regex (nil) use this regex to
|
|
428
|
+
# decide what a word is
|
|
429
|
+
#
|
|
430
|
+
# @option options [Boolean, String, nil] :color_words (nil) equivalent to
|
|
431
|
+
# `--word-diff=color` plus optional regex
|
|
432
|
+
#
|
|
433
|
+
# @option options [Boolean, nil] :no_renames (nil) turn off rename detection
|
|
434
|
+
#
|
|
435
|
+
# @option options [Boolean, nil] :rename_empty (nil) use empty blobs as rename
|
|
436
|
+
# source (`--rename-empty`)
|
|
437
|
+
#
|
|
438
|
+
# @option options [Boolean, nil] :no_rename_empty (nil) do not use empty blobs
|
|
439
|
+
# as rename source (`--no-rename-empty`)
|
|
440
|
+
#
|
|
441
|
+
# @option options [Boolean, nil] :check (nil) warn if changes introduce
|
|
442
|
+
# conflict markers or whitespace errors
|
|
443
|
+
#
|
|
444
|
+
# @option options [String] :ws_error_highlight (nil) highlight whitespace
|
|
445
|
+
# errors in `context`, `old`, or `new` lines
|
|
446
|
+
#
|
|
447
|
+
# @option options [Boolean, nil] :full_index (nil) show full pre- and
|
|
448
|
+
# post-image blob object names
|
|
449
|
+
#
|
|
450
|
+
# @option options [Boolean, nil] :binary (nil) output a binary diff that can
|
|
451
|
+
# be applied with `git apply`
|
|
452
|
+
#
|
|
453
|
+
# @option options [Boolean, Integer, nil] :abbrev (nil) show only a partial
|
|
454
|
+
# prefix of object names
|
|
455
|
+
#
|
|
456
|
+
# Pass `true` for `--abbrev`; pass an integer for `--abbrev=<n>`.
|
|
457
|
+
#
|
|
458
|
+
# @option options [Boolean, String, nil] :break_rewrites (nil) break complete
|
|
459
|
+
# rewrite changes into delete/create pairs
|
|
460
|
+
#
|
|
461
|
+
# Alias: :B
|
|
462
|
+
#
|
|
463
|
+
# @option options [Boolean, String, nil] :find_renames (nil) detect renames,
|
|
464
|
+
# optionally specifying a similarity threshold
|
|
465
|
+
#
|
|
466
|
+
# Alias: :M
|
|
467
|
+
#
|
|
468
|
+
# @option options [Boolean, String, nil] :find_copies (nil) detect copies as
|
|
469
|
+
# well as renames
|
|
470
|
+
#
|
|
471
|
+
# Alias: :C
|
|
472
|
+
#
|
|
473
|
+
# @option options [Boolean, nil] :find_copies_harder (nil) inspect all files
|
|
474
|
+
# as candidates for the source of copy
|
|
475
|
+
#
|
|
476
|
+
# @option options [Boolean, nil] :irreversible_delete (nil) omit the
|
|
477
|
+
# preimage for deletes
|
|
478
|
+
#
|
|
479
|
+
# Alias: :D
|
|
480
|
+
#
|
|
481
|
+
# @option options [Integer, String] :l (nil) prevent rename/copy
|
|
482
|
+
# detection from running if the number of targets exceeds this
|
|
483
|
+
#
|
|
484
|
+
# @option options [String] :diff_filter (nil) select only files matching
|
|
485
|
+
# the specified status letters
|
|
486
|
+
#
|
|
487
|
+
# @option options [String] :S (nil) look for differences that change the
|
|
488
|
+
# number of occurrences of a string
|
|
489
|
+
#
|
|
490
|
+
# @option options [String] :G (nil) look for differences whose patch text
|
|
491
|
+
# contains added/removed lines matching a regex
|
|
492
|
+
#
|
|
493
|
+
# @option options [String] :find_object (nil) look for differences that
|
|
494
|
+
# change the number of occurrences of an object
|
|
495
|
+
#
|
|
496
|
+
# @option options [Boolean, nil] :pickaxe_all (nil) when `-S` or `-G` finds
|
|
497
|
+
# a change, show all changes in that changeset
|
|
498
|
+
#
|
|
499
|
+
# @option options [Boolean, nil] :pickaxe_regex (nil) treat the `-S` string
|
|
500
|
+
# as an extended POSIX regular expression
|
|
501
|
+
#
|
|
502
|
+
# @option options [String] :O (nil) control the order in which files
|
|
503
|
+
# appear in the output
|
|
504
|
+
#
|
|
505
|
+
# @option options [String] :skip_to (nil) discard files before the named
|
|
506
|
+
# file from the output
|
|
507
|
+
#
|
|
508
|
+
# @option options [String] :rotate_to (nil) move files before the named
|
|
509
|
+
# file to the end of the output
|
|
510
|
+
#
|
|
511
|
+
# @option options [Boolean, nil] :R (nil) swap two inputs (reverse diff)
|
|
512
|
+
#
|
|
513
|
+
# @option options [Boolean, String, nil] :relative (nil) show pathnames
|
|
514
|
+
# relative to a subdirectory
|
|
515
|
+
#
|
|
516
|
+
# Pass `true` for `--relative` or a string for `--relative=<path>`.
|
|
517
|
+
#
|
|
518
|
+
# @option options [Boolean, nil] :no_relative (nil) show absolute pathnames
|
|
519
|
+
# (`--no-relative`)
|
|
520
|
+
#
|
|
521
|
+
# @option options [Boolean, nil] :text (nil) treat all files as text
|
|
522
|
+
#
|
|
523
|
+
# Alias: :a
|
|
524
|
+
#
|
|
525
|
+
# @option options [Boolean, nil] :ignore_cr_at_eol (nil) ignore
|
|
526
|
+
# carriage-return at end of line
|
|
527
|
+
#
|
|
528
|
+
# @option options [Boolean, nil] :ignore_space_at_eol (nil) ignore changes
|
|
529
|
+
# in whitespace at end of line
|
|
530
|
+
#
|
|
531
|
+
# @option options [Boolean, nil] :ignore_space_change (nil) ignore changes
|
|
532
|
+
# in amount of whitespace
|
|
533
|
+
#
|
|
534
|
+
# Alias: :b
|
|
535
|
+
#
|
|
536
|
+
# @option options [Boolean, nil] :ignore_all_space (nil) ignore whitespace
|
|
537
|
+
# when comparing lines
|
|
538
|
+
#
|
|
539
|
+
# Alias: :w
|
|
540
|
+
#
|
|
541
|
+
# @option options [Boolean, nil] :ignore_blank_lines (nil) ignore changes
|
|
542
|
+
# whose lines are all blank
|
|
543
|
+
#
|
|
544
|
+
# @option options [String, Array<String>] :ignore_matching_lines (nil)
|
|
545
|
+
# ignore changes whose all lines match the given regex
|
|
546
|
+
#
|
|
547
|
+
# Pass an array for multiple patterns. Maps to
|
|
548
|
+
# `--ignore-matching-lines=<regex>`.
|
|
549
|
+
#
|
|
550
|
+
# Alias: :I
|
|
551
|
+
#
|
|
552
|
+
# @option options [Integer, String] :inter_hunk_context (nil) show the
|
|
553
|
+
# context between diff hunks, fusing nearby hunks
|
|
554
|
+
#
|
|
555
|
+
# @option options [Boolean, nil] :function_context (nil) show whole function
|
|
556
|
+
# as context lines for each change
|
|
557
|
+
#
|
|
558
|
+
# Alias: :W
|
|
559
|
+
#
|
|
560
|
+
# @option options [Boolean, nil] :ext_diff (nil) allow an external diff helper
|
|
561
|
+
# to be used (`--ext-diff`)
|
|
562
|
+
#
|
|
563
|
+
# @option options [Boolean, nil] :no_ext_diff (nil) disallow external diff
|
|
564
|
+
# helpers (`--no-ext-diff`)
|
|
565
|
+
#
|
|
566
|
+
# @option options [Boolean, nil] :textconv (nil) allow external text conversion
|
|
567
|
+
# filters for binary files (`--textconv`)
|
|
568
|
+
#
|
|
569
|
+
# @option options [Boolean, nil] :no_textconv (nil) disallow external text
|
|
570
|
+
# conversion filters (`--no-textconv`)
|
|
571
|
+
#
|
|
572
|
+
# @option options [Boolean, String, nil] :ignore_submodules (nil) ignore
|
|
573
|
+
# changes to submodules in the diff
|
|
574
|
+
#
|
|
575
|
+
# Pass `true` for `--ignore-submodules`; pass a string like `'all'`
|
|
576
|
+
# for `--ignore-submodules=all`.
|
|
577
|
+
#
|
|
578
|
+
# @option options [String] :src_prefix (nil) source prefix for diff
|
|
579
|
+
# headers (e.g. `'a/'`)
|
|
580
|
+
#
|
|
581
|
+
# @option options [String] :dst_prefix (nil) destination prefix for diff
|
|
582
|
+
# headers (e.g. `'b/'`)
|
|
583
|
+
#
|
|
584
|
+
# @option options [Boolean, nil] :no_prefix (nil) do not show any source or
|
|
585
|
+
# destination prefix
|
|
586
|
+
#
|
|
587
|
+
# @option options [Boolean, nil] :default_prefix (nil) use the default source
|
|
588
|
+
# and destination prefixes
|
|
589
|
+
#
|
|
590
|
+
# @option options [String] :line_prefix (nil) prepend an additional prefix
|
|
591
|
+
# to every line of output
|
|
592
|
+
#
|
|
593
|
+
# @option options [Boolean, nil] :ita_invisible_in_index (nil) make
|
|
594
|
+
# intent-to-add entries appear as new files in `git diff`
|
|
595
|
+
#
|
|
596
|
+
# @option options [Boolean, nil] :ita_visible_in_index (nil) revert
|
|
597
|
+
# `--ita-invisible-in-index`
|
|
598
|
+
#
|
|
599
|
+
# @option options [Integer, String] :max_depth (nil) descend at most this
|
|
600
|
+
# many levels of directories per pathspec
|
|
601
|
+
#
|
|
602
|
+
# @option options [String, Array<String>] :pathspec (nil) limit which
|
|
603
|
+
# entries are shown within a tree object
|
|
604
|
+
#
|
|
605
|
+
# Only meaningful when `object` is a tree reference (e.g.
|
|
606
|
+
# `'HEAD^{tree}'`). Pass a string or an array of strings; each is
|
|
607
|
+
# emitted after `--`. Has no effect for commits, blobs, or annotated
|
|
608
|
+
# tags — those object types silently produce no output when pathspecs
|
|
609
|
+
# are supplied.
|
|
610
|
+
#
|
|
611
|
+
# @option options [IO, #write] :out (nil) stream output to this IO object
|
|
612
|
+
# instead of capturing it; `result.stdout` will be `''`
|
|
613
|
+
#
|
|
614
|
+
# @return [Git::CommandLineResult] the result of calling `git show`
|
|
615
|
+
#
|
|
616
|
+
# If `out:` is given, output is streamed directly to the provided IO
|
|
617
|
+
# object and `result.stdout` is `''`.
|
|
618
|
+
#
|
|
619
|
+
# @raise [ArgumentError] if unsupported options are provided
|
|
620
|
+
#
|
|
621
|
+
# @raise [Git::FailedError] if git exits with a non-zero exit status
|
|
622
|
+
#
|
|
623
|
+
# @api public
|
|
624
|
+
|
|
625
|
+
private
|
|
626
|
+
|
|
627
|
+
# @return [false] show output preserves trailing newlines, which are significant
|
|
628
|
+
# for blob content
|
|
629
|
+
def chomp_captured_stdout? = false
|
|
630
|
+
end
|
|
631
|
+
end
|
|
632
|
+
end
|