Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 6f43e89

Browse files
committed
paths
1 parent ccafe8b commit 6f43e89

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

.travis.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ go:
66
- 1.5
77
- tip
88

9-
script:
9+
install:
10+
- rm -rf $GOPATH/src/gopkg.in/src-d
11+
- mkdir -p $GOPATH/src/gopkg.in/src-d
12+
- ln -s $PWD $GOPATH/src/gopkg.in/src-d/go-git.v1
1013
- go get -v -t ./...
11-
- go test
14+
15+
script:
16+
- go test -v ./...

client.go

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import (
77
"net/url"
88
"strings"
99

10-
"github.com/src-d/crawler/clients/common"
11-
"github.com/src-d/crawler/clients/git/pktline"
10+
"gopkg.in/src-d/go-git.v1/pktline"
1211

1312
"github.com/sourcegraph/go-vcsurl"
1413
)
@@ -36,7 +35,7 @@ func (c *Client) Refs() (*Refs, error) {
3635
}
3736

3837
if res.StatusCode >= 400 {
39-
return nil, &common.ErrNotFound{c.url}
38+
return nil, &ErrNotFound{c.url}
4039
}
4140

4241
defer res.Body.Close()
@@ -167,3 +166,15 @@ func (r *Refs) DefaultBranchCommit() string {
167166
func (r *Refs) Branches() map[string]string {
168167
return r.branches
169168
}
169+
170+
type ErrNotFound struct {
171+
url string
172+
}
173+
174+
func (e *ErrNotFound) Url() string {
175+
return e.url
176+
}
177+
178+
func (e *ErrNotFound) Error() string {
179+
return fmt.Sprintf("Unable to find %q", e.url)
180+
}

packfile/objects.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"strconv"
88
"time"
99

10-
"github.com/src-d/crawler/clients/git/commons"
10+
"gopkg.in/src-d/go-git.v1/commons"
1111
)
1212

1313
type Object interface {

0 commit comments

Comments
 (0)