sonic-pi

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

C++

Code. Music. Live.

Rugged::ReferenceCollection#update

Set the target of a reference. If +ref+ is a direct reference,
the new target must be a +String+ representing a SHA1 OID.

If +reference+ is symbolic, the new target must be a +String+ with
the name of another reference.

The original reference is unaltered; a new reference object is
returned with the new target, and the changes are persisted to
disk.

  r1.type #=> :symbolic
  references.update(r1, "refs/heads/master") #=> <Reference>

  r2.type #=> :direct
  references.update(r2, "de5ba987198bcf2518885f0fc1350e5172cded78") #=> <Reference>

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-update-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#update"


# 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-update-for-pr

hub pull-request


# Celebrate!