()
| 58 | } |
| 59 | |
| 60 | func (o *Object) ShortId() (string, error) { |
| 61 | resultBuf := C.git_buf{} |
| 62 | |
| 63 | runtime.LockOSThread() |
| 64 | defer runtime.UnlockOSThread() |
| 65 | |
| 66 | ecode := C.git_object_short_id(&resultBuf, o.ptr) |
| 67 | runtime.KeepAlive(o) |
| 68 | if ecode < 0 { |
| 69 | return "", MakeGitError(ecode) |
| 70 | } |
| 71 | defer C.git_buf_dispose(&resultBuf) |
| 72 | return C.GoString(resultBuf.ptr), nil |
| 73 | } |
| 74 | |
| 75 | func (o *Object) Type() ObjectType { |
| 76 | ret := ObjectType(C.git_object_type(o.ptr)) |