class Gollum::Git::Commit

Public Class Methods

list_from_string(repo, log) click to toggle source

Grit::Commit.list_from_string(@wiki.repo, log)

# File lib/grit_adapter/git_layer_grit.rb, line 119
def self.list_from_string(repo, log)
  Grit::Commit.list_from_string(repo, log)
end
new(commit) click to toggle source
# File lib/grit_adapter/git_layer_grit.rb, line 81
def initialize(commit)
  @commit = commit
end

Public Instance Methods

author() click to toggle source
# File lib/grit_adapter/git_layer_grit.rb, line 101
def author
  author = @commit.author
  Gollum::Git::Actor.new(author.name, author.email)
end
authored_date() click to toggle source
# File lib/grit_adapter/git_layer_grit.rb, line 106
def authored_date
  @commit.authored_date
end
id() click to toggle source
# File lib/grit_adapter/git_layer_grit.rb, line 85
def id
  @commit.id
end
Also aliased as: sha
message() click to toggle source
# File lib/grit_adapter/git_layer_grit.rb, line 110
def message
  @commit.message
end
sha()
Alias for: id
stats() click to toggle source
# File lib/grit_adapter/git_layer_grit.rb, line 94
def stats
  @stats ||= begin
    grit_stats = @commit.stats
    OpenStruct.new(:additions => grit_stats.additions, :deletions => grit_stats.deletions, :files => grit_stats.files, :id => id, :total => grit_stats.total)
  end
end
to_s() click to toggle source
# File lib/grit_adapter/git_layer_grit.rb, line 90
def to_s
  @commit.id
end
tree() click to toggle source
# File lib/grit_adapter/git_layer_grit.rb, line 114
def tree
  Gollum::Git::Tree.new(@commit.tree)
end