Class: Git::Commands::Show Private

Inherits:
Base
  • Object
show all
Defined in:
lib/git/commands/show.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Note:

arguments block audited against https://git-scm.com/docs/git-show/2.53.0

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.

Examples:

Show the HEAD commit

show = Git::Commands::Show.new(execution_context)
result = show.call

Show a specific commit

show = Git::Commands::Show.new(execution_context)
result = show.call('HEAD')

Show the contents of a file at a given revision

show = Git::Commands::Show.new(execution_context)
result = show.call('abc123:README.md')

Show multiple objects

show = Git::Commands::Show.new(execution_context)
result = show.call('v1.0', 'v2.0')

See Also:

Method Summary

Methods inherited from Base

allow_exit_status, arguments, #call, #initialize, requires_git_version, skip_version_validation

Constructor Details

This class inherits a constructor from Git::Commands::Base