summaryrefslogtreecommitdiff
path: root/remote.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2014-04-26 18:43:22 +0200
committerCarlos Martín Nieto <[email protected]>2014-04-26 18:43:22 +0200
commitb3a160b0f8cb91c08b379ac3f3ed8a96a14836d1 (patch)
tree96edce36986f6bb060b4ef59c12626c97b3fcc64 /remote.go
parent9cd1d129bcd567ef65137783a603f8d898d8d933 (diff)
Adjust to libgit2 dev changes
This fixes #87
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/remote.go b/remote.go
index eb5d7a7..4b929c7 100644
--- a/remote.go
+++ b/remote.go
@@ -38,14 +38,14 @@ const (
RemoteCompletionError = C.GIT_REMOTE_COMPLETION_ERROR
)
-type ProgressCallback func(str string) int
+type TransportMessageCallback func(str string) int
type CompletionCallback func(RemoteCompletion) int
type CredentialsCallback func(url string, username_from_url string, allowed_types CredType) (int, *Cred)
type TransferProgressCallback func(stats TransferProgress) int
type UpdateTipsCallback func(refname string, a *Oid, b *Oid) int
type RemoteCallbacks struct {
- ProgressCallback
+ SidebandProgressCallback TransportMessageCallback
CompletionCallback
CredentialsCallback
TransferProgressCallback
@@ -65,14 +65,14 @@ func populateRemoteCallbacks(ptr *C.git_remote_callbacks, callbacks *RemoteCallb
ptr.payload = unsafe.Pointer(callbacks)
}
-//export progressCallback
-func progressCallback(_str *C.char, _len C.int, data unsafe.Pointer) int {
+//export sidebandProgressCallback
+func sidebandProgressCallback(_str *C.char, _len C.int, data unsafe.Pointer) int {
callbacks := (*RemoteCallbacks)(data)
- if callbacks.ProgressCallback == nil {
+ if callbacks.SidebandProgressCallback == nil {
return 0
}
str := C.GoStringN(_str, _len)
- return callbacks.ProgressCallback(str)
+ return callbacks.SidebandProgressCallback(str)
}
//export completionCallback