diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-05-04 10:17:15 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-05-04 10:17:15 +0200 |
commit | b8b61e74469e0d2662e7d690eee14893f91fe259 (patch) | |
tree | 1933fe53200d98ad2c557d034609408641ce2900 /plumbing/transport/file/client_test.go | |
parent | 40fa5882a2c73f8c075403b7ec85870f04deda07 (diff) | |
parent | e80cdbabb92a1ec35ffad536f52d3ff04b548fd1 (diff) | |
download | go-git-b8b61e74469e0d2662e7d690eee14893f91fe259.tar.gz |
Merge branch 'master' of github.com:src-d/go-git into commit
Diffstat (limited to 'plumbing/transport/file/client_test.go')
-rw-r--r-- | plumbing/transport/file/client_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plumbing/transport/file/client_test.go b/plumbing/transport/file/client_test.go index 220df3d..030175e 100644 --- a/plumbing/transport/file/client_test.go +++ b/plumbing/transport/file/client_test.go @@ -1,9 +1,9 @@ package file import ( - "fmt" "io" "os" + "path/filepath" "strings" "testing" @@ -20,13 +20,12 @@ filemode = true bare = true` func prepareRepo(c *C, path string) transport.Endpoint { - url := fmt.Sprintf("file://%s", path) - ep, err := transport.NewEndpoint(url) + ep, err := transport.NewEndpoint(path) c.Assert(err, IsNil) // git-receive-pack refuses to update refs/heads/master on non-bare repo // so we ensure bare repo config. - config := fmt.Sprintf("%s/config", path) + config := filepath.Join(path, "config") if _, err := os.Stat(config); err == nil { f, err := os.OpenFile(config, os.O_TRUNC|os.O_WRONLY, 0) c.Assert(err, IsNil) |