diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-22 13:10:24 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-22 13:11:33 +0200 |
commit | 6f43e8933ba3c04072d5d104acc6118aac3e52ee (patch) | |
tree | 6015756f3da396c6c578a984e967b070a6c71b58 | |
parent | ccafe8bd5f9dbfb8b98b0da03ced29608dcfdeec (diff) | |
download | go-git-6f43e8933ba3c04072d5d104acc6118aac3e52ee.tar.gz |
pathsv1.0.0
-rw-r--r-- | .travis.yml | 9 | ||||
-rw-r--r-- | client.go | 17 | ||||
-rw-r--r-- | packfile/objects.go | 2 |
3 files changed, 22 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index ed30ed0..3c5021e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,11 @@ go: - 1.5 - tip -script: +install: + - rm -rf $GOPATH/src/gopkg.in/src-d + - mkdir -p $GOPATH/src/gopkg.in/src-d + - ln -s $PWD $GOPATH/src/gopkg.in/src-d/go-git.v1 - go get -v -t ./... - - go test + +script: + - go test -v ./... @@ -7,8 +7,7 @@ import ( "net/url" "strings" - "github.com/src-d/crawler/clients/common" - "github.com/src-d/crawler/clients/git/pktline" + "gopkg.in/src-d/go-git.v1/pktline" "github.com/sourcegraph/go-vcsurl" ) @@ -36,7 +35,7 @@ func (c *Client) Refs() (*Refs, error) { } if res.StatusCode >= 400 { - return nil, &common.ErrNotFound{c.url} + return nil, &ErrNotFound{c.url} } defer res.Body.Close() @@ -167,3 +166,15 @@ func (r *Refs) DefaultBranchCommit() string { func (r *Refs) Branches() map[string]string { return r.branches } + +type ErrNotFound struct { + url string +} + +func (e *ErrNotFound) Url() string { + return e.url +} + +func (e *ErrNotFound) Error() string { + return fmt.Sprintf("Unable to find %q", e.url) +} diff --git a/packfile/objects.go b/packfile/objects.go index da47462..91425fa 100644 --- a/packfile/objects.go +++ b/packfile/objects.go @@ -7,7 +7,7 @@ import ( "strconv" "time" - "github.com/src-d/crawler/clients/git/commons" + "gopkg.in/src-d/go-git.v1/commons" ) type Object interface { |