(id *Oid, name string)
| 45 | } |
| 46 | |
| 47 | func (pb *Packbuilder) Insert(id *Oid, name string) error { |
| 48 | cname := C.CString(name) |
| 49 | defer C.free(unsafe.Pointer(cname)) |
| 50 | |
| 51 | runtime.LockOSThread() |
| 52 | defer runtime.UnlockOSThread() |
| 53 | |
| 54 | ret := C.git_packbuilder_insert(pb.ptr, id.toC(), cname) |
| 55 | runtime.KeepAlive(pb) |
| 56 | runtime.KeepAlive(id) |
| 57 | if ret != 0 { |
| 58 | return MakeGitError(ret) |
| 59 | } |
| 60 | return nil |
| 61 | } |
| 62 | |
| 63 | func (pb *Packbuilder) InsertCommit(id *Oid) error { |
| 64 | runtime.LockOSThread() |
nothing calls this directly
no test coverage detected