summaryrefslogtreecommitdiff
path: root/push.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2014-12-14 21:57:06 +0100
committerCarlos Martín Nieto <[email protected]>2014-12-14 21:57:06 +0100
commit6f79e6e60b032d293516ee3a829ada8282822fc0 (patch)
treef45361721d90522978cbd68272bdd8ba1e1c9f4e /push.go
parenta9d993f3d1400970bfba572747edbee1b57fd221 (diff)
parent0202f152ac515aacf38b210df7d77ca82e146663 (diff)
Merge pull request #154 from libgit2/cmn/update
Update to master
Diffstat (limited to 'push.go')
-rw-r--r--push.go22
1 files changed, 5 insertions, 17 deletions
diff --git a/push.go b/push.go
index e6fe51f..f5299c4 100644
--- a/push.go
+++ b/push.go
@@ -31,6 +31,7 @@ func (p *Push) Free() {
C.git_push_free(p.ptr)
}
+// This class is deprecated. Please use Remote.Push() instead
func (remote *Remote) NewPush() (*Push, error) {
runtime.LockOSThread()
@@ -56,16 +57,6 @@ func (p *Push) Finish() error {
return nil
}
-func (p *Push) UnpackOk() bool {
-
- ret := C.git_push_unpack_ok(p.ptr)
- if ret == 0 {
- return false
- }
- return true
-
-}
-
func (p *Push) UpdateTips(sig *Signature, msg string) error {
var csig *C.git_signature = nil
@@ -155,17 +146,14 @@ type PushCallbacks struct {
TransferProgress *PushTransferProgressCallback
}
-type PackbuilderProgressCallback func(stage int, current uint, total uint) int
-type PushTransferProgressCallback func(current uint, total uint, bytes uint) int
-
//export packbuilderProgress
func packbuilderProgress(stage C.int, current C.uint, total C.uint, data unsafe.Pointer) C.int {
- return C.int((*(*PackbuilderProgressCallback)(data))(int(stage), uint(current), uint(total)))
+ return C.int((*(*PackbuilderProgressCallback)(data))(int32(stage), uint32(current), uint32(total)))
}
-//export pushTransferProgress
-func pushTransferProgress(current C.uint, total C.uint, bytes C.size_t, data unsafe.Pointer) C.int {
- return C.int((*(*PushTransferProgressCallback)(data))(uint(current), uint(total), uint(bytes)))
+//export pushStructTransferProgress
+func pushStructTransferProgress(current C.uint, total C.uint, bytes C.size_t, data unsafe.Pointer) C.int {
+ return C.int((*(*PushTransferProgressCallback)(data))(uint32(current), uint32(total), uint(bytes)))
}
func (p *Push) SetCallbacks(callbacks PushCallbacks) {