Skip to content

Commit

Permalink
update and vendor deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jwaldrip committed Aug 15, 2016
1 parent d38ade4 commit 13ceff5
Show file tree
Hide file tree
Showing 574 changed files with 34,786 additions and 18 deletions.
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
GIT2GO=github.com/libgit2/git2go

build: get-dependencies
go build -o ./bin/git-get

install: get-dependencies
go install

get-dependencies:
go get -u github.com/jwaldrip/odin
go get -u github.com/jwaldrip/tint
go get -u github.com/bgentry/speakeasy
go get -u -d $(GIT2GO)
cd $(GOPATH)/src/$(GIT2GO) && git submodule update --init && make install
cd vendor/github.com/libgit2/git2go && git submodule update --init && make install
2 changes: 1 addition & 1 deletion VERSION.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

var version = "0.1.0"
var version = "0.2.0"
16 changes: 8 additions & 8 deletions callbacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func calcPercent(partial, total uint) uint {
}

func buildCertificateCheckCallback(u *url.URL) git.CertificateCheckCallback {
return func(cert *git.Certificate, valid bool, hostname string) int {
return func(cert *git.Certificate, valid bool, hostname string) git.ErrorCode {
if u.Scheme != "ssh" && valid == false {
exitWithMsg("host key check failed for:", hostname)
}
Expand All @@ -24,16 +24,16 @@ func buildCertificateCheckCallback(u *url.URL) git.CertificateCheckCallback {
}

func buildCredentialsCallback(u *url.URL) git.CredentialsCallback {
return func(url, usernameFromURL string, allowedTypes git.CredType) (int, *git.Cred) {
return func(url, usernameFromURL string, allowedTypes git.CredType) (git.ErrorCode, *git.Cred) {
i, cred := git.NewCredDefault()

if allowedTypes&git.CredTypeUserpassPlaintext != 0 {
i, cred = git.NewCredUserpassPlaintext(getInput("username"), getMaskedInput("password"))
return i, &cred
return git.ErrorCode(i), &cred
}
if allowedTypes&git.CredTypeSshKey != 0 {
i, cred = git.NewCredSshKeyFromAgent(u.User.Username())
return i, &cred
return git.ErrorCode(i), &cred
}
if allowedTypes&git.CredTypeSshCustom != 0 {
exitWithMsg("custom ssh not implemented")
Expand All @@ -43,16 +43,16 @@ func buildCredentialsCallback(u *url.URL) git.CredentialsCallback {
exitWithMsg("invalid cred type")
}

return i, &cred
return git.ErrorCode(i), &cred
}
}

func sidebandProgressCallback(str string) int {
func sidebandProgressCallback(str string) git.ErrorCode {
fmt.Printf("\rremote: %v", str)
return 0
}

func transferProgressCallback(stats git.TransferProgress) int {
func transferProgressCallback(stats git.TransferProgress) git.ErrorCode {
i.stats = stats
return i.update()
return git.ErrorCode(i.update())
}
6 changes: 4 additions & 2 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ import (
)

func cloneOptionsForURL(u *url.URL) *git.CloneOptions {
remoteCallbacks := &git.RemoteCallbacks{
remoteCallbacks := git.RemoteCallbacks{
SidebandProgressCallback: sidebandProgressCallback,
TransferProgressCallback: transferProgressCallback,
CredentialsCallback: buildCredentialsCallback(u),
CertificateCheckCallback: buildCertificateCheckCallback(u),
}
return &git.CloneOptions{
FetchOptions: &git.FetchOptions{
RemoteCallbacks: remoteCallbacks,
},
Bare: false,
RemoteCallbacks: remoteCallbacks,
}
}
Empty file added vendor/.gitkeep
Empty file.
201 changes: 201 additions & 0 deletions vendor/github.com/bgentry/speakeasy/LICENSE_WINDOWS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions vendor/github.com/bgentry/speakeasy/Readme.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions vendor/github.com/bgentry/speakeasy/speakeasy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 13ceff5

Please sign in to comment.