sonic-pi

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

C++

Code. Music. Live.

Rugged::Config#transaction

Perform configuration changes in a transaction.

Locks the configuration, executes the given block and stores
any changes that were made to the configuration. If the block
throws an exception, all changes are rolled back automatically.

During the execution of the block, configuration changes don't
get stored to disk immediately, so reading from the configuration
will continue to return the values that were stored in the configuration
when the transaction was started.

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

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Rugged--Config-transaction-for-pr


# Commit to git

git add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_config.cgit commit -m "better docs for Rugged::Config#transaction"


# 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--Config-transaction-for-pr

hub pull-request


# Celebrate!