diff options
| author | Axel Wagner <[email protected]> | 2013-05-17 01:02:33 +0200 |
|---|---|---|
| committer | Axel Wagner <[email protected]> | 2013-05-17 01:02:33 +0200 |
| commit | 420cf7f0a650e711e50dc49b3e5faf4a7ceffa0e (patch) | |
| tree | aaa4e9ef58fa3e4451bd10b911d8fc83950f92b5 | |
| parent | e1238b5994f160a72d8723f7e680a308391a99d9 (diff) | |
Use cbool-helper in Discover()
| -rw-r--r-- | git.go | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -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 |
