class Git::Commands::Show
Wrapper for the ‘git show` command
Displays information about git objects (commits, annotated tags, trees, or blobs). Output format varies by object type and is intended for human consumption rather than machine parsing.
@example Show the HEAD commit
show = Git::Commands::Show.new(execution_context) result = show.call
@example Show a specific commit
show = Git::Commands::Show.new(execution_context) result = show.call('HEAD')
@example Show the contents of a file at a given revision
show = Git::Commands::Show.new(execution_context) result = show.call('abc123:README.md')
@example Show multiple objects
show = Git::Commands::Show.new(execution_context) result = show.call('v1.0', 'v2.0')
@note ‘arguments` block audited against
https://git-scm.com/docs/git-show/2.53.0
@see git-scm.com/docs/git-show git-show documentation
@see Git::Commands
@api private
Private Instance Methods
Source
# File lib/git/commands/show.rb, line 629 def chomp_captured_stdout? = false end
@return [false] show output preserves trailing newlines, which are significant
for blob content