| Age | Commit message (Collapse) | Author |
|
This change adds support for Packbuilder.InsertFromWalk() from libgit2.
|
|
|
|
|
|
|
|
|
|
|
|
Channels provide no means to report an error. Closing a channel could
mean anything.
This is particularly important when dealing with IO, which we do quite
often in the pack builder. Use ForEach which returns an error instead.
|
|
|
|
The library stores error information in thread-local storage, which
means we need to make sure that the Go runtime doesn't switch OS
threads between the time we call a function and th time we attempt to
retrieve the error information.
|
|
This is only needed once per package. Having it on every file makes the
build system ask about it n times, which is silly.
|
|
|
|
Don't name the return values, as they conflict with the names we want
inside and the types don't match what we want to have inside. We need
them to be two-way channels in the function, and then pass
unidirectional references to the different functions.
|
|
Allow aborting the pack writing operation
|
|
The git_packbuilder_write function now takes
two optional arguments used for information
callbacks. These are currently not needed
in the Go wrapper.
|
|
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.
|
|
|
|
This wraps (*packbuilder).ForEach(), making it possible to write the
pack easiliy to a tcp-connection, a HTTP-Body or the like.
|
|
|