6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-07 21:39:15 +00:00

Parse URL and create a repo dir inside CloneRepo function

This commit is contained in:
Grzegorz Dlugoszewski
2020-05-22 12:19:32 +02:00
parent 2bb6f06962
commit 2b622b99fe
4 changed files with 28 additions and 18 deletions

View File

@@ -13,12 +13,12 @@ func TestFetch(t *testing.T) {
createCommit(t, origin, "Initial commit")
// Clone the origin repo
dir := newTempDir(t)
err := CloneRepo(origin.Path(), dir)
repoRoot := newTempDir(t)
path, err := CloneRepo(origin.Path(), repoRoot)
checkFatal(t, err)
// Open cloned repo and load its status
repo, err := OpenRepo(dir)
repo, err := OpenRepo(path)
checkFatal(t, err)
// Check cloned status. It should not be behind origin