(id *Oid)
| 352 | } |
| 353 | |
| 354 | func (v *Repository) SetHeadDetached(id *Oid) error { |
| 355 | runtime.LockOSThread() |
| 356 | defer runtime.UnlockOSThread() |
| 357 | |
| 358 | ecode := C.git_repository_set_head_detached(v.ptr, id.toC()) |
| 359 | runtime.KeepAlive(v) |
| 360 | runtime.KeepAlive(id) |
| 361 | if ecode != 0 { |
| 362 | return MakeGitError(ecode) |
| 363 | } |
| 364 | return nil |
| 365 | } |
| 366 | |
| 367 | func (v *Repository) IsHeadDetached() (bool, error) { |
| 368 | runtime.LockOSThread() |