summaryrefslogtreecommitdiff
path: root/packbuilder.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2020-02-23 14:49:04 +0000
committerlhchavez <[email protected]>2020-02-23 14:49:04 +0000
commit627447092fa24035ed3cd4cf31932dbef6f5a57f (patch)
tree48a9122be45522cf1ec72535cec18fd701db55d2 /packbuilder.go
parent03339f731aba66baacab3fd67e7b2d185cdacb33 (diff)
parent06764f48dce903bf95701c6ef75ad0fe46c0dedf (diff)
Merge remote-tracking branch 'upstream/master' into more-annotated-commit
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)