sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

Rugged::Tree#get_entry_by_oid

Return one of the entries from a tree as a +Hash+, based off the oid SHA.

If the entry doesn't exist, +nil+ will be returned.

This does a full traversal of the every element in the tree, so this method
is not especially fast.

  tree.get_entry_by_oid("d8786bfc97485e8d7b19b21fb88c8ef1f199fc3f")
  #=> {:name => "foo.txt", :type => :blob, :oid => "d8786bfc97485e8d7b19b21fb88c8ef1f199fc3f", :filemode => 0}

Source | Google | Stack overflow

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_tree.c

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Rugged--Tree-get_entry_by_oid-for-pr


# Commit to git

git add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_tree.cgit commit -m "better docs for Rugged::Tree#get_entry_by_oid"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Rugged--Tree-get_entry_by_oid-for-pr

hub pull-request


# Celebrate!