Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Apr 27, 2012
@pda pda README: Rugged::Commit.create() example from rugged_commit.c docs. 64ba348
Commits on Apr 28, 2012
@vmg vmg Merge pull request #58 from pda/readme-commit-create-example
README: Rugged::Commit.create() example from rugged_commit.c docs.
5e3f625
Showing with 9 additions and 8 deletions.
  1. +9 −8 README.md
View
17 README.md
@@ -161,13 +161,14 @@ commit.parents
You can also write new objects to the database this way:
```ruby
-person = Rugged::Signature.new('Scott', 'schacon@gmail.com', Time.now)
-
-commit = Rugged::Commit.new(repo)
-commit.message = "my message"
-commit.author = person
-commit.tree = commit
-commit.write
+author = {:email=>"tanoku@gmail.com", :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) #=> "f148106ca58764adc93ad4e2d6b1d168422b9796"
```
### Tag Objects
@@ -405,4 +406,4 @@ Now that those are installed, you can install Rugged:
## License
-MIT. See LICENSE file.
+MIT. See LICENSE file.

No commit comments for this range

Something went wrong with that request. Please try again.