sonic-pi

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

C++

Code. Music. Live.

Rugged::Object#create_note

Write a new +note+ to +object+, with the given +data+
arguments, passed as a +Hash+:

- +:message+: the content of the note to add to the object
- +:committer+: (optional) a hash with the signature for the committer
  defaults to the signature from the configuration
- +:author+: (optional) a hash with the signature for the author
  defaults to the signature from the configuration
- +:ref+: (optional): canonical name of the reference to use, defaults to "refs/notes/commits"
- +:force+: (optional): overwrite existing note (disabled by default)

When the note is successfully written to disk, its +oid+ will be
returned as a hex +String+.

  author = {:email=>"[email protected]", :time=>Time.now, :name=>"Vicent Mart\303\255"}

  obj.create_note(
    :author    => author,
    :committer => author,
    :message   => "Hello world\n\n",
    :ref       => 'refs/notes/builds'
  )

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

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Rugged--Object-create_note-for-pr


# Commit to git

git add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_note.cgit commit -m "better docs for Rugged::Object#create_note"


# 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--Object-create_note-for-pr

hub pull-request


# Celebrate!