Permalink
Browse files

Fix Rugged::Reference part.

1. ref.type returns a symbol instead of string.
2. ref.set_target instead of ref.target=
3. Reference entry has keys id_old and id_new instead of oid_*
  • Loading branch information...
1 parent 89dbfe0 commit 49bec48fdcf2969819551647f7fd53a1767ebc76 @DawidJanczak DawidJanczak committed Mar 23, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 README.md
View
@@ -317,7 +317,7 @@ ref = repo.head # or...
ref = Rugged::Reference.lookup(repo, "refs/heads/master")
sha = ref.target
-str = ref.type # "commit"
+str = ref.type # :direct
str = ref.name # "refs/heads/master"
```
@@ -342,7 +342,7 @@ It is also easy to create, update, rename or delete a reference:
```ruby
ref = Rugged::Reference.create(repo, "refs/heads/unit_test", some_commit_sha)
-ref.target = new_sha
+ref.set_target(new_sha)
ref.rename("refs/heads/blead")
@@ -354,8 +354,8 @@ Finally, you can access the reflog for any branch:
```ruby
ref = Rugged::Reference.lookup(repo, "refs/heads/master")
entry = ref.log.first
-sha = entry[:oid_old]
-sha = entry[:oid_new]
+sha = entry[:id_old]
+sha = entry[:id_new]
str = entry[:message]
prsn = entry[:committer]
```

0 comments on commit 49bec48

Please sign in to comment.