Closed
Description
Given:
- All tests (even
Clone
) initialize aRepository
before they run a test - The tests that make use of
Clone
seem to be using a local file path - The limited number of examples available
I am not really sure if this is due to a misuse of the API, or a bug. In any case, the following used to work before not too long ago with git2go/v31
and backing crypto / transport dependencies:
func TestRemoteClone(t *testing.T) {
t.Parallel()
path, err := ioutil.TempDir("", "git2go")
if err != nil {
t.Fatalf("Failed to init temp dir")
}
defer os.RemoveAll(path)
remote, err := Clone("https://github.com/libgit2/libgit2", path, &CloneOptions{})
if err != nil {
t.Fatalf("Clone() = %v, want success", err)
}
defer remote.Free()
}
While attempting to update to git2go/v32
however, and trying to depend on less C libraries, this now returns a remote pointer not found
error:
=== RUN TestRemoteClone
=== PAUSE TestRemoteClone
=== CONT TestRemoteClone
remote_test.go:94: Clone() = remote pointer not found, want success
--- FAIL: TestRemoteClone (0.00s)
Following the breadcrumbs, it seems to end on https://github.com/libgit2/git2go/blob/main/clone.go#L43 returning -7
(which makes me wonder even more).
Metadata
Metadata
Assignees
Labels
No labels