(path string, stage int)
| 466 | } |
| 467 | |
| 468 | func (v *Index) EntryByPath(path string, stage int) (*IndexEntry, error) { |
| 469 | cpath := C.CString(path) |
| 470 | defer C.free(unsafe.Pointer(cpath)) |
| 471 | |
| 472 | runtime.LockOSThread() |
| 473 | defer runtime.UnlockOSThread() |
| 474 | |
| 475 | centry := C.git_index_get_bypath(v.ptr, cpath, C.int(stage)) |
| 476 | if centry == nil { |
| 477 | return nil, MakeGitError(C.int(ErrorCodeNotFound)) |
| 478 | } |
| 479 | ret := newIndexEntryFromC(centry) |
| 480 | runtime.KeepAlive(v) |
| 481 | return ret, nil |
| 482 | } |
| 483 | |
| 484 | func (v *Index) Find(path string) (uint, error) { |
| 485 | cpath := C.CString(path) |
nothing calls this directly
no test coverage detected