class Grit::Repo

Public Instance Methods

changes(ops) click to toggle source
# File lib/transparent_git/repo.rb, line 53
def changes(ops)
  branch = ops[:branch] || 'master'
  num_commits = ops[:end] - ops[:start] + 1
  cs = commits(branch,num_commits,ops[:start])
  cs = cs.reject { |x| bad_commit_hashes.include?(x.id) }
  cs.map { |x| changes_for_commit(x) }.flatten
end
changes_for_commit(commit) click to toggle source
# File lib/transparent_git/repo.rb, line 31
def changes_for_commit(commit)
  commit.diffs.map do |diff|
    POChange.from_diff(commit,diff)
  end
end
good_commits() click to toggle source
# File lib/transparent_git/repo.rb, line 44
def good_commits
  all_commits.reject { |x| bad_commit_hashes.include?(x.id) }
end
latest_files() click to toggle source
# File lib/transparent_git/repo.rb, line 47
def latest_files
  t = commits('master',1).first.tree
  res = []
  each_tree_file(t) { |name,blob| res << RepoFile.new(:file => name, :body => blob.data.stripped_chars) }
  res
end