sonic-pi

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

C++

Code. Music. Live.

Rugged::Commit.create_to_s

Create a string with the contents of the commit, created with the
given +data+ arguments, passed as a +Hash+:

- +:message+: a string with the full text for the commit's message
- +: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
- +:parents+: an +Array+ with zero or more parents for this commit,
  represented as <tt>Rugged::Commit</tt> instances, or OID +String+.
- +:tree+: the tree for this commit, represented as a <tt>Rugged::Tree</tt>
  instance or an OID +String+.

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

  Rugged::Commit.create(r,
    :author => author,
    :message => "Hello world\n\n",
    :committer => author,
    :parents => ["2cb831a8aea28b2c1b9c63385585b864e4d3bad1"],
    :tree => some_tree) #=> "tree some_tree\nparent 2cb831...."

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

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Rugged--Commit-create_to_s-for-pr


# Commit to git

git add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_commit.cgit commit -m "better docs for Rugged::Commit.create_to_s"


# 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--Commit-create_to_s-for-pr

hub pull-request


# Celebrate!