class Grit::Tag

Public Class Methods

find_all(repo, options = {}) click to toggle source
# File lib/grit/lib/grit/tag.rb, line 4
def self.find_all(repo, options = {})
  refs = repo.git.refs(options, prefix)
  refs.split("\n").map do |ref|
    name, id = *ref.split(' ')
    cid = repo.git.commit_from_sha(id)
    raise "Unknown object type." if cid == ''
    commit = Commit.create(repo, :id => cid)
    self.new(name, commit)
  end
end