sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
Rugged::SubmoduleCollection#setup_add
Setup a new +submodule+ for checkout in +repository+. This does <tt>"git submodule add"</tt> up to the fetch and checkout of the submodule contents. It prepares a new submodule, creates an entry in +.gitmodules+ and creates an empty initialized repository either at the given +path+ in the working directory or in +.git/modules+ with a gitlink from the working directory to the new repository. To fully emulate <tt>"git submodule add"</tt> call this function, then open the submodule repository and perform the clone step as needed. Lastly, call Submodule#finalize_add to wrap up adding the new submodule and +.gitmodules+ to the index to be ready to commit. - +url+: URL for the submodule's remote - +path+: path at which the submodule should be created The following options can be passed in the +options+ Hash: :gitlink :: (defaults to +true+) should workdir contain a gitlink to the repository in +.git/modules+ vs. repository directly in workdir. Returns the newly created +submodule+
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_submodule_collection.c
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Rugged--SubmoduleCollection-setup_add-for-pr
# Commit to gitgit add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_submodule_collection.cgit commit -m "better docs for Rugged::SubmoduleCollection#setup_add"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Rugged--SubmoduleCollection-setup_add-for-pr
hub pull-request
# Celebrate!