Skip to content

Commit 7549a40

Browse files
committed
this url.Parse is actually OK
1 parent 8b28b71 commit 7549a40

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

git/git_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"github.com/go-git/go-billy/v5"
2222
"github.com/go-git/go-billy/v5/memfs"
2323
"github.com/go-git/go-billy/v5/osfs"
24-
gittransport "github.com/go-git/go-git/v5/plumbing/transport"
2524
githttp "github.com/go-git/go-git/v5/plumbing/transport/http"
2625
gitssh "github.com/go-git/go-git/v5/plumbing/transport/ssh"
2726
"github.com/stretchr/testify/require"
@@ -141,9 +140,9 @@ func TestCloneRepo(t *testing.T) {
141140
authMW := mwtest.BasicAuthMW(tc.srvUsername, tc.srvPassword)
142141
srv := httptest.NewServer(authMW(gittest.NewServer(srvFS)))
143142

144-
authURL, err := gittransport.NewEndpoint(srv.URL)
143+
authURL, err := url.Parse(srv.URL)
145144
require.NoError(t, err)
146-
authURL.User = url.UserPassword(tc.username, tc.password).String()
145+
authURL.User = url.UserPassword(tc.username, tc.password)
147146
clientFS := memfs.New()
148147

149148
cloned, err := git.CloneRepo(context.Background(), t.Logf, git.CloneRepoOptions{

0 commit comments

Comments
 (0)