Method: Rugged::Walker#each
- Defined in:
- ext/rugged/rugged_revwalk.c
#each {|commit| ... } ⇒ Object #each ⇒ Enumerator
Perform the walk through the repository, yielding each one of the commits found as a Rugged::Commit instance to block.
If no block is given, an Enumerator will be returned.
The walker must have been previously set-up before a walk can be performed (i.e. at least one commit must have been pushed).
walker.push("92b22bbcb37caf4f6f53d30292169e84f5e4283b")
walker.each { |commit| puts commit.oid }
generates:
92b22bbcb37caf4f6f53d30292169e84f5e4283b
6b750d5800439b502de669465b385e5f469c78b6
ef9207141549f4ffcd3c4597e270d32e10d0a6bc
cb75e05f0f8ac3407fb3bd0ebd5ff07573b16c9f
...
446 447 448 449 |
# File 'ext/rugged/rugged_revwalk.c', line 446
static VALUE rb_git_walker_each(int argc, VALUE *argv, VALUE self)
{
return rb_git_walk_with_opts(argc, argv, self, 0);
}
|