sonic-pi

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

C++

Code. Music. Live.

Rugged::Commit#amend

Amend a commit object, 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
- +:tree+: the tree for this amended commit, represented as a <tt>Rugged::Tree</tt>
  instance or an OID +String+.
- +:update_ref+ (optional): a +String+ with the name of a reference in the
repository which should be updated to point to this amended commit (e.g. "HEAD")

When the amended commit 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"}

  commit.amend(
    :author => author,
    :message => "Updated Hello world\n\n",
    :committer => author,
    :tree => some_tree) #=> "f148106ca58764adc93ad4e2d6b1d168422b9796"

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


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

hub pull-request


# Celebrate!