In case of an error in the writer, the packbuilder will stay around waiting for someone to read from its channel. The state associated with a packbuilder is non-trivial and it will keep a reference to the object, so the GC won't be able to free it. Change the ForEach interface to also return a "stop" channel. Closing the channel or writing into it will cause the first receive clause to act, making the callback to return -1, aborting the operation and ending the goroutine, freeing its hold on the packbuilder. |
||
---|---|---|
LICENSE | ||
README.md | ||
blob.go | ||
checkout.go | ||
commit.go | ||
config.go | ||
git.go | ||
index.go | ||
index_test.go | ||
odb.go | ||
packbuilder.go | ||
reference.go | ||
reference_test.go | ||
repository.go | ||
submodule.go | ||
tree.go | ||
walk.go | ||
wrapper.c |
README.md
git2go
Go bindings for libgit2. These bindings are for top-of-the-branch libgit2, and they move fast, things may or may not work. Operator get me Beijing-jing-jing-jing!
Installing
Just go get github.com/libgit2/git2go
. You'll need to have top-of-the-branch libgit2 from development installed in your system and available via pkg-config
. These bindings are in sync with the top of development
.
License
M to the I to the T. See the LICENSE file if you've never seen a MIT license before.
Authors
- Carlos Martín (@carlosmn)
- Vicent Martí (@vmg)