diff options
| -rw-r--r-- | clone.go | 1 | ||||
| -rw-r--r-- | clone_test.go | 19 |
2 files changed, 19 insertions, 1 deletions
@@ -55,7 +55,6 @@ func Clone(url string, path string, options *CloneOptions) (*Repository, error) } func populateCloneOptions(ptr *C.git_clone_options, opts *CloneOptions) { - ptr = &C.git_clone_options{} C.git_clone_init_options(ptr, C.GIT_CLONE_OPTIONS_VERSION) if opts == nil { diff --git a/clone_test.go b/clone_test.go new file mode 100644 index 0000000..6145228 --- /dev/null +++ b/clone_test.go @@ -0,0 +1,19 @@ +package git + +import ( + "io/ioutil" + "testing" +) + +func TestClone(t *testing.T) { + + repo := createTestRepo(t) + seedTestRepo(t, repo) + + path, err := ioutil.TempDir("", "git2go") + checkFatal(t, err) + + _, err = Clone(repo.Path(), path, &CloneOptions{Bare: true}) + + checkFatal(t, err) +} |
