sonic-pi

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

C++

Code. Music. Live.

Rugged::Index#add_all

Add or update index entries matching files in the working directory.

Searches the working directory for files that +pathspec+ and adds them
to +index+ (by updating an existing entry or adding a new entry).

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

Files that are ignored due to +.gitignore+ rules will be skipped,
unless they're already have an entry in +index+.

Files that are marked as the result of a merge request, will have this
marking removed and the merge conflict information will be moved into the
"resolve undo" (REUC) section of +index+.

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 added to the index.

This method will fail in bare index instances.

The following options can be passed in the +options+ Hash:

:force ::
  If +true+, any +.gitignore+ rules will be ignored.

:disable_pathspec_match ::
  If +true+, glob expansion will be disabled and exact matching will be forced.

:check_pathspec ::
  If +true+, and the +:force+ options is +false+ or not given, exact matches
  of ignored files or files that are not already in +index+ will raise a
  Rugged::InvalidError. This emulates <code>git add -A</code>.

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-add_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#add_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-add_all-for-pr

hub pull-request


# Celebrate!