Methods
A
M
N
T
Included Modules
Attributes
[RW] refs
[RW] space
[RW] time
Class Public methods
new(commit)
# File lib/gitlab/graph/commit.rb, line 10
def initialize(commit)
  @_commit = commit
  @time = -1
  @space = 0
end
Instance Public methods
add_refs(ref_cache, repo)
# File lib/gitlab/graph/commit.rb, line 36
def add_refs(ref_cache, repo)
  if ref_cache.empty?
    repo.refs.each do |ref|
      ref_cache[ref.commit.id] ||= []
      ref_cache[ref.commit.id] << ref
    end
  end
  @refs = ref_cache[@_commit.id] if ref_cache.include?(@_commit.id)
  @refs ||= []
end
method_missing(m, *args, &block)
# File lib/gitlab/graph/commit.rb, line 16
def method_missing(m, *args, &block)
  @_commit.send(m, *args, &block)
end
to_graph_hash()
# File lib/gitlab/graph/commit.rb, line 20
def to_graph_hash
  h = {}
  h[:parents] = self.parents.collect do |p|
    [p.id,0,0]
  end
  h[:author]  = author.name
  h[:time]    = time
  h[:space]   = space
  h[:refs]    = refs.collect{|r|r.name}.join(" ") unless refs.nil?
  h[:id]      = sha
  h[:date]    = date
  h[:message] = message
  h[:login]   = author.email
  h
end