sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
Rugged::Blob.from_io
Write a loose blob to the +repository+ from an +IO+ provider
of data.
The repository can be bare or not.
The data provider +io+ should respond to a <code>read(size)</code>
method. Generally any instance of a class based on Ruby's +IO+ class
should work(ex. +File+). On each +read+ call it should
return a +String+ with maximum size of +size+.
*NOTE:* If an exception is raised in the +io+ object's
+read+ method, no blob will be created.
Provided the +hint_path+ parameter is given, its value
will help to determine what git filters should be applied
to the object before it can be placed to the object database.
File.open('/path/to/file') do |file|
Blob.from_io(repo, file, 'hint/blob.h') #=> '42cab3c0cde61e2b5a2392e1eadbeffa20ffa171'
endEdit
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_blob.c
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Rugged--Blob-from_io-for-pr
# Commit to gitgit add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_blob.cgit commit -m "better docs for Rugged::Blob.from_io"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Rugged--Blob-from_io-for-pr
hub pull-request
# Celebrate!