sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
Rugged::Submodule#status
Returns an +array+ with the status flags for a submodule. Depending on the #ignore_rule property of the submodule, some of the flags may never be returned because they indicate changes that are supposed to be ignored. Submodule info is contained in 4 places: the +HEAD+ tree, the index, config files (both +.git/config+ and +.gitmodules+), and the working directory. Any or all of those places might be missing information about the submodule depending on what state the repository is in. We consider all four places to build the combination of status flags. There are four values that are not really status, but give basic info about what sources of submodule data are available. These will be returned even if ignore is set to +:all+. :in_head :: superproject +HEAD+ contains submodule :in_index :: superproject index contains submodule :in_config :: superproject +.gitmodules+ has submodule :in_workdir :: superproject workdir has submodule The following values will be returned as long as ignore is not +:all+. :added_to_index :: submodule is in index, not in +HEAD+ :deleted_from_index :: submodule is in +HEAD+, not in index :modified_in_index :: submodule in index and +HEAD+ don't match :uninitialized :: submodule in workdir is not initialized :added_to_workdir :: submodule is in workdir, not index :deleted_from_workdir :: submodule is in index, not workdir :modified_in_workdir :: submodule in index and workdir +HEAD+ don't match The following can only be returned if ignore is +:none+ or +:untracked+. :dirty_workdir_index :: submodule workdir index is dirty :modified_files_in_workdir :: submodule workdir has modified files Lastly, the following will only be returned for ignore +:none+. :untracked_files_in_workdir :: submodule workdir contains untracked files
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.c
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Rugged--Submodule-status-for-pr
# Commit to gitgit add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_submodule.cgit commit -m "better docs for Rugged::Submodule#status"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Rugged--Submodule-status-for-pr
hub pull-request
# Celebrate!