diff options
| author | Yashodhan Ghadge <[email protected]> | 2021-10-23 20:33:10 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-10-23 10:33:10 -0700 |
| commit | 0e8009f00a65034d196c67b1cdd82af6f12c34d3 (patch) | |
| tree | 26ea2a1a90daac40ab95aecbcbf98fa156223177 /clone_test.go | |
| parent | 6eae74c128e37e590d3a5da3fe0561add4b94d5c (diff) | |
bugfix: HTTPS Clone fails with remote pointer not found using Go transport (#836) (#842)
Fixes: #836
Changes:
* adding a weak bool param for Remote
* create a new remote in the smartTransportCallback incase one is not found
Diffstat (limited to 'clone_test.go')
| -rw-r--r-- | clone_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clone_test.go b/clone_test.go index 8814dd0..9ff03e6 100644 --- a/clone_test.go +++ b/clone_test.go @@ -2,6 +2,7 @@ package git import ( "io/ioutil" + "os" "testing" ) @@ -70,3 +71,17 @@ func TestCloneWithCallback(t *testing.T) { } defer remote.Free() } + +// TestCloneWithExternalHTTPUrl +func TestCloneWithExternalHTTPUrl(t *testing.T) { + + path, err := ioutil.TempDir("", "git2go") + defer os.RemoveAll(path) + + // clone the repo + url := "https://github.com/libgit2/TestGitRepository" + _, err = Clone(url, path, &CloneOptions{}) + if err != nil { + t.Fatal("cannot clone remote repo via https, error: ", err) + } +} |
