aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-01-29 02:17:01 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2017-01-29 02:17:01 +0100
commit352170d1bf8cc7b32b85d8a2740eb3627e952a6e (patch)
treeba9cdd6b32b0871a78fcd91aee90a388dd3e2326 /examples
parentde1c0bfec0269ff2a31b62d13612d833da178ec4 (diff)
downloadgo-git-352170d1bf8cc7b32b85d8a2740eb3627e952a6e.tar.gz
worktree, status implementation
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,
})