class Gitra::TrackedBranch

Public Class Methods

new(git, branch) click to toggle source
# File lib/gitra/tracker.rb, line 35
def initialize(git, branch)
  @git = git
  @branch = branch.to_s
end

Public Instance Methods

commits_since(reference, options = {:ancestry => true}) click to toggle source
# File lib/gitra/tracker.rb, line 40
def commits_since(reference, options = {:ancestry => true})
  since = @git.object(reference.to_s)
  base = @git.merge_base(@branch, since)
  if options[:ancestry]
    @git.log_ancestry(base, @branch).reverse
  else
    @git.log(2**16).between(base, @branch).to_a.reverse
  end
end