(odb *Odb)
| 123 | } |
| 124 | |
| 125 | func NewRepositoryWrapOdb(odb *Odb) (repo *Repository, err error) { |
| 126 | runtime.LockOSThread() |
| 127 | defer runtime.UnlockOSThread() |
| 128 | |
| 129 | var ptr *C.git_repository |
| 130 | ret := C.git_repository_wrap_odb(&ptr, odb.ptr) |
| 131 | runtime.KeepAlive(odb) |
| 132 | if ret < 0 { |
| 133 | return nil, MakeGitError(ret) |
| 134 | } |
| 135 | |
| 136 | return newRepositoryFromC(ptr), nil |
| 137 | } |
| 138 | |
| 139 | func (v *Repository) SetRefdb(refdb *Refdb) { |
| 140 | C.git_repository_set_refdb(v.ptr, refdb.ptr) |
searching dependent graphs…