sonic-pi

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

C++

Code. Music. Live.

Rugged::ReferenceCollection#rename

Change the name of a reference. If +force+ is +true+, any previously
existing references will be overwritten when renaming.

Return a new reference object with the new object

  reference.name #=> 'refs/heads/master'
  new_ref = references.rename(ref, 'refs/heads/development') #=> <Reference>
  new_ref.name #=> 'refs/heads/development'

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

:force ::
  Overwrites the reference with the given +name+, if it already exists,
  instead of raising an exception.

If a reference with the given +new_name+ already exists and +:force+ is not +true+,
an exception will be raised.

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

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Rugged--ReferenceCollection-rename-for-pr


# Commit to git

git add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_reference_collection.cgit commit -m "better docs for Rugged::ReferenceCollection#rename"


# 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--ReferenceCollection-rename-for-pr

hub pull-request


# Celebrate!