sonic-pi

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

C++

Code. Music. Live.

Rugged::Index#update_all

Update all index entries to match the working directory.

Searches +index+ for entries that match +pathspec+ and synchronizes
them with the content of the working directory.

+pathspec+ can either be a String, or an Array of Strings.
If +pathspec+ is empty, all entries in the index will be matched.

Entries where the corresponding working directory file no longer exists
get deleted, all other matched entries will get updated to reflect their
working directory state (the latest version of the a file's content will
automatically be added to the ODB).

If a block is given, each matched +path+ and the +pathspec+ that matched
it will be passed to the block. If the return value of +block+ is
falsy, the matching item will not be updated in the index.

This method will fail in bare index instances.

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

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Rugged--Index-update_all-for-pr


# Commit to git

git add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_index.cgit commit -m "better docs for Rugged::Index#update_all"


# 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--Index-update_all-for-pr

hub pull-request


# Celebrate!