sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
Rugged::Walker.walk
Create a Walker object, initialize it with the given options and perform a walk on the repository; the lifetime of the walker is bound to the call and it is immediately cleaned up after the walk is over. The following options are available: - +sort+: Sorting mode for the walk (or an OR combination of several sorting modes). - +show+: Tips of the repository that will be walked; this is necessary for the walk to yield any results. A tip can be a 40-char object ID, an existing +Rugged::Commit+ object, a reference, or an +Array+ of several of these (if you'd like to walk several tips in parallel). - +hide+: Same as +show+, but hides the given tips instead so they don't appear on the walk. - +oid_only+: if +true+, the walker will yield 40-char OIDs for each commit, instead of real +Rugged::Commit+ objects. Defaults to +false+. - +simplify+: if +true+, the walk will be simplified to the first parent of each commit. Example: Rugged::Walker.walk(repo, show: "92b22bbcb37caf4f6f53d30292169e84f5e4283b", sort: Rugged::SORT_DATE|Rugged::SORT_TOPO, oid_only: true) do |commit_oid| puts commit_oid end generates: 92b22bbcb37caf4f6f53d30292169e84f5e4283b 6b750d5800439b502de669465b385e5f469c78b6 ef9207141549f4ffcd3c4597e270d32e10d0a6bc cb75e05f0f8ac3407fb3bd0ebd5ff07573b16c9f ...
Edit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_revwalk.c
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Rugged--Walker-walk-for-pr
# Commit to gitgit add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_revwalk.cgit commit -m "better docs for Rugged::Walker.walk"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Rugged--Walker-walk-for-pr
hub pull-request
# Celebrate!