aboutsummaryrefslogtreecommitdiffstats
path: root/examples/basic
diff options
context:
space:
mode:
Diffstat (limited to 'examples/basic')
-rw-r--r--examples/basic/main.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/basic/main.go b/examples/basic/main.go
index 6dc2ba1..fd7f82e 100644
--- a/examples/basic/main.go
+++ b/examples/basic/main.go
@@ -9,13 +9,14 @@ import (
)
func main() {
- fmt.Printf("Retrieving %q ...\n", os.Args[1])
- r, err := git.NewRepository(os.Args[1], nil)
+ url := os.Args[1]
+ fmt.Printf("Retrieving %q ...\n", url)
+ r, err := git.NewMemoryRepository()
if err != nil {
panic(err)
}
- if err = r.PullDefault(); err != nil {
+ if err = r.Clone(&git.CloneOptions{URL: url}); err != nil {
panic(err)
}