()
| 417 | } |
| 418 | |
| 419 | func (v *Index) WriteTree() (*Oid, error) { |
| 420 | oid := new(Oid) |
| 421 | |
| 422 | runtime.LockOSThread() |
| 423 | defer runtime.UnlockOSThread() |
| 424 | |
| 425 | ret := C.git_index_write_tree(oid.toC(), v.ptr) |
| 426 | runtime.KeepAlive(v) |
| 427 | if ret < 0 { |
| 428 | return nil, MakeGitError(ret) |
| 429 | } |
| 430 | |
| 431 | return oid, nil |
| 432 | } |
| 433 | |
| 434 | func (v *Index) Write() error { |
| 435 | runtime.LockOSThread() |