This repository was archived by the owner on Sep 11, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 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 ./...
Original file line number Diff line number Diff line change 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 {
167166func (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+ }
Original file line number Diff line number Diff line change 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
1313type Object interface {
You can’t perform that action at this time.
0 commit comments