diff options
| author | Carlos MartÃn Nieto <[email protected]> | 2019-01-04 12:11:05 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-01-04 12:11:05 +0000 |
| commit | b51a90c13329109db0c9ce2303ddf5ad08b3fe5b (patch) | |
| tree | 33026385742ca079c7ba60a3577818e16fd360da /packbuilder.go | |
| parent | c27981c283b5e02fcbbf17cce0a3e6da9339986c (diff) | |
| parent | 8d27336e8a158dccc55c966f57ff7e90acce1614 (diff) | |
Merge pull request #465 from lhchavez/packbuilder-insert_from_walk
Add support for Packbuilder.InsertFromWalk()
Diffstat (limited to 'packbuilder.go')
| -rw-r--r-- | packbuilder.go | 13 |
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) |
