Add support for Packbuilder.InsertFromWalk()
This change adds support for Packbuilder.InsertFromWalk() from libgit2.
This commit is contained in:
parent
eec1547c20
commit
8d27336e8a
|
@ -85,6 +85,19 @@ func (pb *Packbuilder) InsertTree(id *Oid) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (pb *Packbuilder) InsertWalk(walk *RevWalk) error {
|
||||
runtime.LockOSThread()
|
||||
defer runtime.UnlockOSThread()
|
||||
|
||||
ret := C.git_packbuilder_insert_walk(pb.ptr, walk.ptr)
|
||||
runtime.KeepAlive(pb)
|
||||
runtime.KeepAlive(walk)
|
||||
if ret != 0 {
|
||||
return MakeGitError(ret)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (pb *Packbuilder) ObjectCount() uint32 {
|
||||
ret := uint32(C.git_packbuilder_object_count(pb.ptr))
|
||||
runtime.KeepAlive(pb)
|
||||
|
|
Loading…
Reference in New Issue