Reset resets the memory packer by clearing all the queued objects. This assumes that Mempack.Dump has been called before to store all the queued objects into a single packfile.
()
| 81 | // This assumes that Mempack.Dump has been called before to store all the |
| 82 | // queued objects into a single packfile. |
| 83 | func (mempack *Mempack) Reset() error { |
| 84 | runtime.LockOSThread() |
| 85 | defer runtime.UnlockOSThread() |
| 86 | |
| 87 | ret := C.git_mempack_reset(mempack.ptr) |
| 88 | if ret < 0 { |
| 89 | return MakeGitError(ret) |
| 90 | } |
| 91 | return nil |
| 92 | } |