diff options
author | Santiago M. Mola <santi@mola.io> | 2017-04-28 15:20:51 +0200 |
---|---|---|
committer | Santiago M. Mola <santi@mola.io> | 2017-04-28 16:33:31 +0200 |
commit | 4a670e130804d630fa056e4a60101698dc7a9af1 (patch) | |
tree | 289fed4a798d9e3c7bdc633970109d8a7a856737 /repository_test.go | |
parent | 727bf94da8e3cebd3ff467d30425b12d671fbca7 (diff) | |
download | go-git-4a670e130804d630fa056e4a60101698dc7a9af1.tar.gz |
do not convert local paths to URL
* Do not convert local paths to URLs, just keep them as they
are.
* This way we add support for Windows without taking care of
Windows path-to-URL conversion.
Diffstat (limited to 'repository_test.go')
-rw-r--r-- | repository_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/repository_test.go b/repository_test.go index fd8d405..deb3f58 100644 --- a/repository_test.go +++ b/repository_test.go @@ -388,7 +388,7 @@ func (s *RepositorySuite) TestPlainCloneWithRecurseSubmodules(c *C) { path := fixtures.ByTag("submodule").One().Worktree().Base() r, err := PlainClone(dir, false, &CloneOptions{ - URL: fmt.Sprintf("file://%s", path), + URL: path, RecurseSubmodules: DefaultSubmoduleRecursionDepth, }) @@ -678,7 +678,7 @@ func (s *RepositorySuite) TestPullProgressWithRecursion(c *C) { r, _ := PlainInit(dir, false) r.CreateRemote(&config.RemoteConfig{ Name: DefaultRemoteName, - URL: fmt.Sprintf("file://%s", path), + URL: path, }) err = r.Pull(&PullOptions{ @@ -694,7 +694,7 @@ func (s *RepositorySuite) TestPullAdd(c *C) { path := fixtures.Basic().ByTag("worktree").One().Worktree().Base() r, err := Clone(memory.NewStorage(), nil, &CloneOptions{ - URL: fmt.Sprintf("file://%s", filepath.Join(path, ".git")), + URL: filepath.Join(path, ".git"), }) c.Assert(err, IsNil) @@ -729,7 +729,7 @@ func (s *RepositorySuite) TestPushToEmptyRepository(c *C) { c.Assert(err, IsNil) dstFs := fixtures.ByTag("empty").One().DotGit() - url := fmt.Sprintf("file://%s", dstFs.Base()) + url := dstFs.Base() r, err := Open(sto, srcFs) c.Assert(err, IsNil) |