(path string)
| 178 | } |
| 179 | |
| 180 | func (v *Repository) StatusFile(path string) (Status, error) { |
| 181 | var statusFlags C.uint |
| 182 | cPath := C.CString(path) |
| 183 | defer C.free(unsafe.Pointer(cPath)) |
| 184 | |
| 185 | runtime.LockOSThread() |
| 186 | defer runtime.UnlockOSThread() |
| 187 | |
| 188 | ret := C.git_status_file(&statusFlags, v.ptr, cPath) |
| 189 | runtime.KeepAlive(v) |
| 190 | if ret < 0 { |
| 191 | return 0, MakeGitError(ret) |
| 192 | } |
| 193 | return Status(statusFlags), nil |
| 194 | } |