Count all Refs
+repo+ is the Repo +options+ is a Hash of options
Returns int
# File lib/grit/ref.rb, line 12 def count_all(repo, options = {}) refs = repo.git.refs(options, prefix) refs.split("\n").size end
Find all Refs
+repo+ is the Repo +options+ is a Hash of options
Returns Grit::Ref[] (baked)
# File lib/grit/ref.rb, line 22 def find_all(repo, options = {}) refs = repo.git.refs(options, prefix) refs.split("\n").map do |ref| name, id = *ref.split(' ') self.new(name, repo, id) end end
Instantiate a new Head
+name+ is the name of the head +commit+ is the Commit that the head points to
Returns Grit::Head (baked)
# File lib/grit/ref.rb, line 45 def initialize(name, repo, commit_id) @name = name @commit_id = commit_id @repo_ref = repo @commit = nil end
Generated with the Darkfish Rdoc Generator 2.