sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
Rugged::Repository.hash_data
Hash the contents of +str+ as raw bytes (ignoring any encoding
information) and adding the relevant header corresponding to +type+,
and return a hex string representing the result from the hash.
Repository.hash_data('hello world', :commit) #=> "de5ba987198bcf2518885f0fc1350e5172cded78"
Repository.hash_data('hello_world', :tag) #=> "9d09060c850defbc7711d08b57def0d14e742f4e"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_repo.c
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Rugged--Repository-hash_data-for-pr
# Commit to gitgit add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_repo.cgit commit -m "better docs for Rugged::Repository.hash_data"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Rugged--Repository-hash_data-for-pr
hub pull-request
# Celebrate!