diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-11-21 11:27:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-21 11:27:37 +0100 |
commit | 97fb5e93083fbe4ea02078312ae2cbca3b145ab1 (patch) | |
tree | 4ce4c4b5616edb713ea2bc0ebbf485376933cc91 /plumbing/transport/file | |
parent | dd81bc9156afb8102dd4c082a81bdb285d2e0a4b (diff) | |
parent | 5eb1c562e7deb4191cb160af91a864fb783c1041 (diff) | |
download | go-git-97fb5e93083fbe4ea02078312ae2cbca3b145ab1.tar.gz |
Merge pull request #650 from mcuadros/endpoint
transport: converts Endpoint interface into a struct
Diffstat (limited to 'plumbing/transport/file')
-rw-r--r-- | plumbing/transport/file/client.go | 4 | ||||
-rw-r--r-- | plumbing/transport/file/client_test.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plumbing/transport/file/client.go b/plumbing/transport/file/client.go index d229fdd..e799ee1 100644 --- a/plumbing/transport/file/client.go +++ b/plumbing/transport/file/client.go @@ -73,7 +73,7 @@ func prefixExecPath(cmd string) (string, error) { return cmd, nil } -func (r *runner) Command(cmd string, ep transport.Endpoint, auth transport.AuthMethod, +func (r *runner) Command(cmd string, ep *transport.Endpoint, auth transport.AuthMethod, ) (common.Command, error) { switch cmd { @@ -95,7 +95,7 @@ func (r *runner) Command(cmd string, ep transport.Endpoint, auth transport.AuthM } } - return &command{cmd: exec.Command(cmd, ep.Path())}, nil + return &command{cmd: exec.Command(cmd, ep.Path)}, nil } type command struct { diff --git a/plumbing/transport/file/client_test.go b/plumbing/transport/file/client_test.go index 864cddc..25ea278 100644 --- a/plumbing/transport/file/client_test.go +++ b/plumbing/transport/file/client_test.go @@ -41,7 +41,7 @@ repositoryformatversion = 0 filemode = true bare = true` -func prepareRepo(c *C, path string) transport.Endpoint { +func prepareRepo(c *C, path string) *transport.Endpoint { ep, err := transport.NewEndpoint(path) c.Assert(err, IsNil) |