aboutsummaryrefslogtreecommitdiffstats
path: root/examples/basic
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-09-11 20:35:06 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-09-11 20:35:06 +0200
commit58fe211f1b0e4863b425542d2fad15803276fd66 (patch)
treec200b6317b7b1c77c312faa411ab39e6e4468967 /examples/basic
parent6f1d1e00a7c615209cf6b25e314d033bda3b5d09 (diff)
downloadgo-git-58fe211f1b0e4863b425542d2fad15803276fd66.tar.gz
format: packfile fix ReadObjectAt without decode
Diffstat (limited to 'examples/basic')
-rw-r--r--examples/basic/main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/basic/main.go b/examples/basic/main.go
index 1d59a6b..d92002a 100644
--- a/examples/basic/main.go
+++ b/examples/basic/main.go
@@ -10,7 +10,7 @@ import (
)
func main() {
- r := git.NewMemoryRepository()
+ r, _ := git.NewFilesystemRepository(".git")
// Clone the given repository, creating the remote, the local branches
// and fetching the objects, exactly as:
@@ -28,8 +28,8 @@ func main() {
// ... retrieving the branch being pointed by HEAD
ref, _ := r.Head()
// ... retrieving the commit object
- commit, _ := r.Commit(ref.Hash())
- fmt.Println(commit)
+ commit, err := r.Commit(ref.Hash())
+ fmt.Println(commit, err)
// List the tree from HEAD
// > git ls-tree -r HEAD