summaryrefslogtreecommitdiff
path: root/status.go
diff options
context:
space:
mode:
authorBen Navetta <[email protected]>2014-08-25 18:15:36 -0400
committerBen Navetta <[email protected]>2014-08-25 18:15:36 -0400
commit33ae83f4d9b78501549fc880c1e2dd055466808c (patch)
treeacf4d2d8f390c3a4f3d5219d329c7c2add9769f9 /status.go
parentc8529e79da002e6c816c0df895edc7ce7a543a37 (diff)
remove status_foreach binding
Diffstat (limited to 'status.go')
-rw-r--r--status.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/status.go b/status.go
index efe6eb0..644b13e 100644
--- a/status.go
+++ b/status.go
@@ -3,14 +3,11 @@ package git
/*
#include <git2.h>
#include <git2/errors.h>
-
-int _go_git_status_foreach(git_repository *repo, void *data);
*/
import "C"
import (
"runtime"
- "unsafe"
)
type Status int
@@ -170,26 +167,3 @@ func (v *Repository) StatusFile(path string) (Status, error) {
}
return Status(statusFlags), nil
}
-
-type StatusCallback func(path string, status Status) int
-
-//export fileStatusForeach
-func fileStatusForeach(_path *C.char, _flags C.uint, _payload unsafe.Pointer) C.int {
- path := C.GoString(_path)
- flags := Status(_flags)
-
- cb := (*StatusCallback)(_payload)
- return C.int((*cb)(path, flags))
-}
-
-func (v *Repository) StatusForeach(callback StatusCallback) error {
- runtime.LockOSThread()
- defer runtime.UnlockOSThread()
-
- ret := C._go_git_status_foreach(v.ptr, unsafe.Pointer(&callback))
-
- if ret < 0 {
- return MakeGitError(ret)
- }
- return nil
-}