summaryrefslogtreecommitdiff
path: root/packbuilder.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2020-02-23 13:53:17 +0000
committerlhchavez <[email protected]>2020-02-23 13:53:17 +0000
commitc20008416a64e2ae884a14332b258160a261a5df (patch)
tree58ae95d9f007937876eed1aac89b0518a034e442 /packbuilder.go
parent79fe156d307a9c7b294aa92c741dc0c2759a1894 (diff)
parent4bca045e5aa98b0b791fb467705de0692fe3514f (diff)
Merge remote-tracking branch 'upstream/master' into git_index_add_frombuffer
Diffstat (limited to 'packbuilder.go')
-rw-r--r--packbuilder.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/packbuilder.go b/packbuilder.go
index 0e04bbf..576e5ca 100644
--- a/packbuilder.go
+++ b/packbuilder.go
@@ -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)