(spec string)
| 75 | } |
| 76 | |
| 77 | func (v *Repository) RevparseSingle(spec string) (*Object, error) { |
| 78 | cspec := C.CString(spec) |
| 79 | defer C.free(unsafe.Pointer(cspec)) |
| 80 | |
| 81 | var ptr *C.git_object |
| 82 | |
| 83 | runtime.LockOSThread() |
| 84 | defer runtime.UnlockOSThread() |
| 85 | |
| 86 | ecode := C.git_revparse_single(&ptr, v.ptr, cspec) |
| 87 | if ecode < 0 { |
| 88 | return nil, MakeGitError(ecode) |
| 89 | } |
| 90 | |
| 91 | return allocObject(ptr, v), nil |
| 92 | } |
| 93 | |
| 94 | func (r *Repository) RevparseExt(spec string) (*Object, *Reference, error) { |
| 95 | cspec := C.CString(spec) |