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 /plumbing/transport/file/upload_pack_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 'plumbing/transport/file/upload_pack_test.go')
-rw-r--r-- | plumbing/transport/file/upload_pack_test.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/plumbing/transport/file/upload_pack_test.go b/plumbing/transport/file/upload_pack_test.go index e5915f0..f013683 100644 --- a/plumbing/transport/file/upload_pack_test.go +++ b/plumbing/transport/file/upload_pack_test.go @@ -1,8 +1,8 @@ package file import ( - "fmt" "os" + "path/filepath" "github.com/src-d/go-git-fixtures" "gopkg.in/src-d/go-git.v4/plumbing/transport" @@ -25,20 +25,18 @@ func (s *UploadPackSuite) SetUpSuite(c *C) { fixture := fixtures.Basic().One() path := fixture.DotGit().Base() - url := fmt.Sprintf("file://%s", path) - ep, err := transport.NewEndpoint(url) + ep, err := transport.NewEndpoint(path) c.Assert(err, IsNil) s.Endpoint = ep fixture = fixtures.ByTag("empty").One() path = fixture.DotGit().Base() - url = fmt.Sprintf("file://%s", path) - ep, err = transport.NewEndpoint(url) + ep, err = transport.NewEndpoint(path) c.Assert(err, IsNil) s.EmptyEndpoint = ep - url = fmt.Sprintf("file://%s/%s", fixtures.DataFolder, "non-existent") - ep, err = transport.NewEndpoint(url) + path = filepath.Join(fixtures.DataFolder, "non-existent") + ep, err = transport.NewEndpoint(path) c.Assert(err, IsNil) s.NonExistentEndpoint = ep } |