summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Martí <[email protected]>2013-05-16 17:43:26 -0700
committerVicent Martí <[email protected]>2013-05-16 17:43:26 -0700
commit4e0a28b064047513194a842e9c16d9beab545f41 (patch)
tree855480da00c32688d498801b71494219888828ae
parentb1c3de066f363a9910e3c6bc3dbddbc68386a1c5 (diff)
parent420cf7f0a650e711e50dc49b3e5faf4a7ceffa0e (diff)
Merge pull request #23 from Merovius/discover
Use cbool-helper in Discover()
-rw-r--r--git.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/git.go b/git.go
index e11f676..fdc640a 100644
--- a/git.go
+++ b/git.go
@@ -134,14 +134,7 @@ func Discover(start string, across_fs bool, ceiling_dirs []string) (string, erro
retpath := (*C.char)(C.malloc(C.GIT_PATH_MAX))
defer C.free(unsafe.Pointer(retpath))
- var acrfs C.int
- if across_fs {
- acrfs = 1
- } else {
- acrfs = 0
- }
-
- r := C.git_repository_discover(retpath, C.GIT_PATH_MAX, cstart, acrfs, ceildirs)
+ r := C.git_repository_discover(retpath, C.GIT_PATH_MAX, cstart, cbool(across_fs), ceildirs)
if r == 0 {
return C.GoString(retpath), nil