Method: Rugged::Repository#walk

Defined in:
lib/rugged/repository.rb

#walk(from, sorting = Rugged::SORT_DATE, &block) ⇒ Object

Walks over a set of commits using Rugged::Walker.

from - The String SHA1 to push onto Walker to begin our walk. sorting - The sorting order of the commits, as defined in the README. block - A block that we pass into walker#each.

Returns nothing if called with a block, otherwise returns an instance of Enumerable::Enumerator containing Rugged::Commit objects.

[View source]

136
137
138
139
140
141
# File 'lib/rugged/repository.rb', line 136

def walk(from, sorting=Rugged::SORT_DATE, &block)
  walker = Rugged::Walker.new(self)
  walker.sorting(sorting)
  walker.push(from)
  walker.each(&block)
end