Class: Metior::Git::Commit
Overview
Represents a commit in a Git source code repository
Instance Attribute Summary
Attributes inherited from Commit
#author, #authored_date, #children, #committed_date, #committer, #id, #message, #parents, #repo
Instance Method Summary collapse
-
#initialize(repo, commit) ⇒ Commit
constructor
Creates a new Git commit object linked to the repository and branch it belongs to and the data from the corresponding
Grit::Commit
object.
Methods inherited from Commit
#add_child, #added_files, #additions, #deleted_files, #deletions, #inspect, #load_file_stats, #load_line_stats, #merge?, #modifications, #modified_files, #subject
Methods included from AutoIncludeVCS
Constructor Details
#initialize(repo, commit) ⇒ Commit
Creates a new Git commit object linked to the repository and branch it
belongs to and the data from the corresponding Grit::Commit
object
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/metior/git/commit.rb', line 22 def initialize(repo, commit) super repo @authored_date = commit. @committed_date = commit.committed_date @id = commit.id @message = commit. @parents = commit.parents.map { |parent| parent.id } self. = commit. self.committer = commit.committer end |