(t ObjectType)
| 281 | } |
| 282 | |
| 283 | func (v *Reference) Peel(t ObjectType) (*Object, error) { |
| 284 | var cobj *C.git_object |
| 285 | |
| 286 | runtime.LockOSThread() |
| 287 | defer runtime.UnlockOSThread() |
| 288 | |
| 289 | err := C.git_reference_peel(&cobj, v.ptr, C.git_object_t(t)) |
| 290 | runtime.KeepAlive(v) |
| 291 | if err < 0 { |
| 292 | return nil, MakeGitError(err) |
| 293 | } |
| 294 | |
| 295 | return allocObject(cobj, v.repo), nil |
| 296 | } |
| 297 | |
| 298 | // Owner returns a weak reference to the repository which owns this reference. |
| 299 | // This won't keep the underlying repository alive, but it should still be |
nothing calls this directly
no test coverage detected