mirror of
https://github.com/grdl/git-get.git
synced 2026-02-10 01:29:19 +00:00
Refactor URL parsing so it's not being called twice
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package pkg
|
||||
|
||||
import (
|
||||
urlpkg "net/url"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
@@ -14,7 +15,9 @@ func TestFetch(t *testing.T) {
|
||||
|
||||
// Clone the origin repo
|
||||
repoRoot := newTempDir(t)
|
||||
path, err := CloneRepo(origin.Path(), repoRoot)
|
||||
url, err := urlpkg.Parse(origin.Path())
|
||||
checkFatal(t, err)
|
||||
path, err := CloneRepo(url, repoRoot)
|
||||
checkFatal(t, err)
|
||||
|
||||
// Open cloned repo and load its status
|
||||
|
||||
Reference in New Issue
Block a user