(prefix string)
| 498 | } |
| 499 | |
| 500 | func (v *Index) FindPrefix(prefix string) (uint, error) { |
| 501 | cprefix := C.CString(prefix) |
| 502 | defer C.free(unsafe.Pointer(cprefix)) |
| 503 | |
| 504 | runtime.LockOSThread() |
| 505 | defer runtime.UnlockOSThread() |
| 506 | |
| 507 | var pos C.size_t |
| 508 | ret := C.git_index_find_prefix(&pos, v.ptr, cprefix) |
| 509 | runtime.KeepAlive(v) |
| 510 | if ret < 0 { |
| 511 | return uint(0), MakeGitError(ret) |
| 512 | } |
| 513 | return uint(pos), nil |
| 514 | } |
| 515 | |
| 516 | func (v *Index) HasConflicts() bool { |
| 517 | ret := C.git_index_has_conflicts(v.ptr) != 0 |
nothing calls this directly
no test coverage detected