aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml9
-rw-r--r--client.go17
-rw-r--r--packfile/objects.go2
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 ./...
diff --git a/client.go b/client.go
index 616dd8d..78ddbb7 100644
--- a/client.go
+++ b/client.go
@@ -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 {