Module: Gitoe::Repo::RestfulRepo
- Included in:
- RestfulRugged
- Defined in:
- lib/gitoe/repo/repo.rb
Instance Method Summary collapse
- #commits(start, options = {}) ⇒ Object
-
#status ⇒ Object
public methods( ‘resources’ ): #status #commits.
Instance Method Details
#commits(start, options = {}) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/gitoe/repo/repo.rb', line 53 def commits start, ={} # start : # commits to start at, # possible multiple, ',' # options : # limit limit = (['limit'] || 1000).to_i to_query = start.split ',' queried = {} while to_query.size > 0 and queried.size < limit another = to_query.shift next if queried.has_key?(another) parent = commit another queried[ parent[:sha1] ] ||= parent parent[:parents].each do |p| next if queried.has_key? p to_query.push p end end $gitoe_log[ "gathered #{queried.size} from #{start}" ] queried end |
#status ⇒ Object
public methods( ‘resources’ ):
#status
#commits
45 46 47 48 49 50 51 |
# File 'lib/gitoe/repo/repo.rb', line 45 def status { :refs => refs , :path => path , :cached_commits => size_of_cache, } end |