Skip to content
This repository was archived by the owner on Aug 25, 2018. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions gbvendor/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ func (g *gitrepo) Type() string {

// Checkout fetchs the remote branch, tag, or revision. If the branch is blank,
// then the default remote branch will be used. If the branch is "HEAD" and
// revision is empty, an impossible update is assumed.
// revision is empty, an impossible update is assumed. Sub modules are also checked out
func (g *gitrepo) Checkout(branch, tag, revision string) (WorkingCopy, error) {
if branch == "HEAD" && revision == "" {
return nil, fmt.Errorf("cannot update %q as it has been previously fetched with -tag or -revision. Please use gvt delete then fetch again.", g.url)
Expand All @@ -332,7 +332,9 @@ func (g *gitrepo) Checkout(branch, tag, revision string) (WorkingCopy, error) {
quiet := false
args := []string{
"clone",
"-q", // silence progress report to stderr
"--recursive", // include submodules
"-j8", // fetch up to 8 submodules in parallel (for performance)
"-q", // silence progress report to stderr
g.url,
dir,
}
Expand Down
23 changes: 12 additions & 11 deletions gbvendor/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,18 @@ func TestDeduceRemoteRepo(t *testing.T) {
},
extra: "/go/vcs",
}, {
path: "labix.org/v2/mgo",
want: &bzrrepo{
url: "https://launchpad.net/mgo/v2",
},
insecure: true,
}, {
path: "launchpad.net/gnuflag",
want: &bzrrepo{
url: "https://launchpad.net/gnuflag",
},
}, {
// TODO: These two are broken
// path: "labix.org/v2/mgo",
// want: &bzrrepo{
// url: "https://launchpad.net/mgo/v2",
// },
// insecure: true,
//}, {
// path: "launchpad.net/gnuflag",
// want: &bzrrepo{
// url: "https://launchpad.net/gnuflag",
// },
//}, {
path: "https://github.com/pkg/sftp",
want: &gitrepo{
url: "https://github.com/pkg/sftp",
Expand Down