Class: Rosette::Core::Commands::ShowCommand
- Inherits:
-
DiffBaseCommand
- Object
- Command
- GitCommand
- DiffBaseCommand
- Rosette::Core::Commands::ShowCommand
- Includes:
- WithRef, WithRepoName
- Defined in:
- lib/rosette/core/commands/git/show_command.rb
Overview
Show the phrases that were added, removed, or modified directly by the given commit. Essentially this means a diff against the parent.
Instance Attribute Summary
Attributes included from WithRef
Attributes included from WithRepoName
Attributes inherited from DiffBaseCommand
Attributes inherited from Command
Instance Method Summary collapse
-
#execute ⇒ Hash
Computes the show (i.e. parent diff).
Methods included from WithRef
#commit_id, #set_commit_id, #set_ref
Methods included from WithRepoName
Methods inherited from DiffBaseCommand
Methods included from WithSnapshots
Methods inherited from GitCommand
Methods inherited from Command
#initialize, #messages, #valid?, validate, validators
Constructor Details
This class inherits a constructor from Rosette::Core::Commands::DiffBaseCommand
Instance Method Details
#execute ⇒ Hash
Computes the show (i.e. parent diff).
40 41 42 43 44 |
# File 'lib/rosette/core/commands/git/show_command.rb', line 40 def execute parent_commit_ids = build_parent_commit_list phrase_diff = diff_between(commit_id, parent_commit_ids) filter_phrase_diff(commit_id, parent_commit_ids, phrase_diff) end |