(path string, flags RepositoryOpenFlag, ceiling string)
| 85 | ) |
| 86 | |
| 87 | func OpenRepositoryExtended(path string, flags RepositoryOpenFlag, ceiling string) (*Repository, error) { |
| 88 | cpath := C.CString(path) |
| 89 | defer C.free(unsafe.Pointer(cpath)) |
| 90 | |
| 91 | var cceiling *C.char = nil |
| 92 | if len(ceiling) > 0 { |
| 93 | cceiling = C.CString(ceiling) |
| 94 | defer C.free(unsafe.Pointer(cceiling)) |
| 95 | } |
| 96 | |
| 97 | runtime.LockOSThread() |
| 98 | defer runtime.UnlockOSThread() |
| 99 | |
| 100 | var ptr *C.git_repository |
| 101 | ret := C.git_repository_open_ext(&ptr, cpath, C.uint(flags), cceiling) |
| 102 | if ret < 0 { |
| 103 | return nil, MakeGitError(ret) |
| 104 | } |
| 105 | |
| 106 | return newRepositoryFromC(ptr), nil |
| 107 | } |
| 108 | |
| 109 | func InitRepository(path string, isbare bool) (*Repository, error) { |
| 110 | cpath := C.CString(path) |
nothing calls this directly
no test coverage detected
searching dependent graphs…