aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/clone/main.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/clone/main.go b/examples/clone/main.go
index 13257ca..fc50960 100644
--- a/examples/clone/main.go
+++ b/examples/clone/main.go
@@ -13,13 +13,10 @@ func main() {
url := os.Args[1]
directory := os.Args[2]
- r, err := git.NewFilesystemRepository(directory)
- CheckIfError(err)
-
// Clone the given repository to the given directory
Info("git clone %s %s", url, directory)
- err = r.Clone(&git.CloneOptions{
+ r, err := git.PlainClone(directory, false, &git.CloneOptions{
URL: url,
Depth: 1,
})